To call this endpoint, the API Key need to have the
Place and Manage Orders
permission enabled (via OSL website).
Execute Order
Request
To accept a quote published by OSL (submit an order against previously quoted).
Field | Req’d | Type | Description |
---|---|---|---|
messageType | Y | String | order |
side | Y | String | BUY if executing against an offerSELL if executing against a bid |
clientRequestId | Y | String | Client supplied order identifier |
quoteId | Y | String | Quote ID of quote being executed |
accountGrpUuid | N | String | Account group ref to use |
quantity | N | Double | Should be <= the Subscribe Quantity |
Request example:
{
"messageType": "order",
"side": "BUY",
"clientRequestId": "xx3",
"quoteId": "<QUOTE_ID>",
"accountGrpUuid": ""
}
Response
Where an order has been successfully executed, client will receive the following confirmation.
Field | Req'd | Type | Description |
---|---|---|---|
messageType | Y | String | order |
timestamp | Y | Long | time of execution in millis |
message | Y | String | Confirmation message |
code | Y | String | Error code |
instrument | Y | String | Currency-pair but with "." as a separator of base currency and quote currency. |
side | Y | String | BUY if executing against an offerSELL if executing against a bid |
price | Y | String | Price at which the order was filled |
quantity | Y | String | Quantity equal to the quoted quantity |
clientRequestId | Y | String | Client supplied order identifier |
orderStatus | Y | String | Order Status SUCCESS , INDETERMINATE or FAILED |
quoteId | Y | String | Quote ID of quote being executed |
transactionId | Y | String | System generated reference Id |
Response example:
{
"timestamp": 409937058888162,
"messageType": "order",
"message": "",
"code": "",
"instrument": "BTC.USD",
"side": "BUY",
"price": "38790.007200",
"quantity": "0.008000",
"clientRequestId": "xx",
"orderStatus": "SUCCESS",
"quoteId": "<QUOTE_ID>>",
"transactionId": "<TRANSACTION_D>"
}