Last active
October 30, 2015 20:14
-
-
Save patio11/1ad9a632fe94e8699434 to your computer and use it in GitHub Desktop.
Starfighter REST API request and response JSON samples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//JSON to POST to /venues/FOOEX/stocks/BAR/orders | |
{ | |
“symbol”: “BAR”, | |
“venue”: “FOOEX”, | |
“direction”: “buy”, | |
“qty”: 20, | |
“price”: 5100, | |
“type”: “limit”, | |
“account” : “OGB12345”, // your trading account (game gives you this) | |
} | |
// JSON you get as a response if you do that | |
{ | |
“ok”: true, | |
“symbol”: “BAR”, | |
“venue”: “FOOEX”, | |
“direction”: “buy”, | |
“originalQty”: 100, | |
“qty”: 20, // this is the quantity *left outstanding* | |
“price”: 5100, // the price on the order — may not match that of fills! | |
“type”: “limit”, | |
“id”: 12345, // guaranteed unique *on this venue* | |
“account” : “OGB12345”, | |
“ts”: “2015-07-05T22:16:18+00:00”, // ISO-8601 timestamp for when we received order | |
“fills”: | |
[ | |
{ | |
“price”: 5050, | |
“qty”: 50 | |
“ts”: “2015-07-05T22:16:18+00:00” | |
}, … // may have zero or multiple fills. Note this order presumably has a total of 80 shares worth | |
], | |
“totalFilled”: 80, | |
“open”: true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment