Skip to main content
POST
/
order_service.v1.OrderService
/
GetExecutableOrders
GetExecutableOrders
curl --request POST \
  --url https://api.fairground.fi/order_service.v1.OrderService/GetExecutableOrders \
  --header 'Authorization: Bearer <token>' \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "marketId": 123,
  "price": 123,
  "limit": 123
}
'
{
  "orders": [
    {
      "owner": "<string>",
      "orderId": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "marketId": "<string>",
      "market": "<string>",
      "type": "ORDER_TYPE_MARKET",
      "thresholdPrice": 123,
      "size": 123,
      "leverage": 123,
      "filledSize": 123,
      "unfilledSize": 123,
      "reduceOnly": true,
      "canceled": true,
      "initialMargin": 123,
      "tickDecimals": 123,
      "fees": 123,
      "rebates": 123
    }
  ],
  "totalCount": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Connect-Protocol-Version
enum<number>
default:1
required

Define the version of the Connect protocol. If omitted, use 1.

Available options:
1
Connect-Timeout-Ms
number

Define the timeout, in ms

Body

application/json
marketId

Market to query

price
number<double>

Price threshold for executable orders

side
enum<string> | null

Optional: filter by side (LONG/SHORT)

Available options:
SIDE_LONG,
SIDE_SHORT
limit
integer | null

Optional: limit number of results

Response

Success

orders
Order · object[]

Executable orders matching criteria

totalCount
integer

Total executable orders matching criteria