Skip to main content
POST
/
orderbook_service.v1.OrderBookService
/
GetOrderBook
GetOrderBook
curl --request POST \
  --url https://api.fairground.fi/orderbook_service.v1.OrderBookService/GetOrderBook \
  --header 'Authorization: Bearer <token>' \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "market": {
    "marketId": 123
  },
  "tickSize": 123,
  "usdPrice": true
}
'
{
  "orderBook": {
    "marketId": 123,
    "timestamp": "2023-11-07T05:31:56Z",
    "longs": [
      {
        "price": 123,
        "size": 123,
        "total": 123,
        "currency": "<string>"
      }
    ],
    "shorts": [
      {
        "price": 123,
        "size": 123,
        "total": 123,
        "currency": "<string>"
      }
    ]
  }
}

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>
required

Define the version of the Connect protocol

Available options:
1
Connect-Timeout-Ms
number

Define the timeout, in ms

Body

application/json
market
market · object
tickSize
number<float>
usdPrice
boolean

Response

Success

orderBook
order_book · object