Skip to main content
POST
/
order_service.v1.OrderService
/
GetAllOrders
GetAllOrders
curl --request POST \
  --url https://api.fairground.fi/order_service.v1.OrderService/GetAllOrders \
  --header 'Authorization: Bearer <token>' \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "limit": 123,
  "offset": 123,
  "address": "<string>",
  "onlyOpen": true
}
'
{
  "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
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 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
limit
integer

Maximum number of results (default: 50, max: 1000)

offset
integer

Number of results to skip (default: 0)

address
string | null

Optional: filter by owner address

onlyOpen
boolean | null

Optional: filter to open orders only (PENDING, PARTIALLY_FILLED, PARTIALLY_MERGED)

Response

Success

orders
Order · object[]
pagination
pagination · object

Pagination metadata