Giter Site home page Giter Site logo

Comments (2)

jekru avatar jekru commented on September 24, 2024

POST https://www.wikifolio.com/api/virtualorder/placeorder has such a payload:

{
  "wikifolioId":"3f7f7343-a0a5-42ed-b038-839b63498c10",
  "underlyingIsin":"US0378331005",
  "amount":1,
  "buysell":"buy",
  "orderType":"quote",
  "limitPrice":null,
  "stopPrice":null,
  "takeProfitLimitPrice":null,
  "stopLossStopPrice":null,
  "stopLossLimitPrice":null,
  "validUntil":null,
  "quoteId":"42b12a32-4df0-4e58-92ae-81addbd7dc59"
}

We are not sending quoteId with the api request. That should be the problem. But where can we get this parameter?
Let's click on "Preis holen" an see what happens.

example_wikifolio

No new request is made, so there has to be some kind of conection already established because the parameter orderId is not static. Websockets? Yeah!

wss://www.wikifolio.com/de/de/signalr/connect?transport=webSockets&clientProtocol=[clientProtocol]&connectionToken=[connectionToken]&connectionData=[{"name":"livehub"},{"name":"quotehub"}]&tid=[tid]

The websocket message that is being sent looks like this:

{
    "A": [
        "ea8e9c3f-fb36-4a89-8cf9-f1bc3a116868",
        "US0378331005",
        "1",
        910
    ],
    "H": "quotehub",
    "I": 25,
    "M": "GetQuote",
}

A[0]: string := GUID (but not the orderId!)
A[1]: string := ISIN
A[2]: number := AMOUNT
A[3]: number := 910 (BUY) | 920 (SELL)
"I": number := INCREMENTING ID (since the connection was established)

The websocket response looks like this:

[
    {
        "H": "QuoteHub",
        "M": "quoteCallback",
        "A": [
            {
                "QuoteId": "f5fb9ff0-14d9-4c1f-ad38-c88f8c9c949c",
                "WaitForManuelResponse": false,
                "Ask": 122.41,
                "Bid": 122.2,
                "ValidityDuration": 3000,
                "Currency": "EUR"
            }
        ]
    }
]

We finally got the parameter "QuoteId" that we have to add to our json payload with the post request. That was the debugging/reverse engineering part, now the implementing part begins.

from wikifolio.

RienNeVaPlus avatar RienNeVaPlus commented on September 24, 2024

Implemented by jekru in v0.3.4

from wikifolio.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.