Comments (2)
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.
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.
Implemented by jekru in v0.3.4
from wikifolio.
Related Issues (12)
- general questions, totally new to typescript and trying to get this to run HOT 2
- Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. HOT 2
- 2FA for creating trades on wikifolio HOT 7
- ⚠️ It will (probably) break soon. HOT 8
- Bug: res.body has changed for some accounts
- new to javascript, can't get anything to work HOT 3
- Feature Request: Download 'Kontoauszug' from 'Analyse'-Tab HOT 1
- Does you API work? HOT 1
- Error: Login failed, Cookie not found
- Error: Cannot find module 'request' HOT 6
- Order cannot be placed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikifolio.