Skip to main content
GET
/
api
/
v1
/
order_history
Get user order history
curl --request GET \
  --url https://api.mainnet.aptoslabs.com/decibel/api/v1/order_history \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "cancellation_reason": "<string>",
      "client_order_id": "<string>",
      "details": "<string>",
      "is_buy": true,
      "is_reduce_only": true,
      "is_tpsl": true,
      "market": "<string>",
      "order_direction": "<string>",
      "order_id": "<string>",
      "order_type": "<string>",
      "parent": "<string>",
      "status": "<string>",
      "transaction_version": 1,
      "trigger_condition": "<string>",
      "unix_ms": 1,
      "orig_size": 123,
      "price": 123,
      "remaining_size": 123,
      "size_delta": 123,
      "sl_limit_price": 123,
      "sl_trigger_price": 123,
      "tp_limit_price": 123,
      "tp_trigger_price": 123
    }
  ],
  "total_count": 1
}

Authorizations

Authorization
string
header
required

Bearer token from Geomi. See Authentication for setup instructions.

Query Parameters

account
string
required

User account address (user query alias is also accepted)

limit
integer<int32>
default:10

Page size

Required range: 0 <= x <= 200
offset
integer<int32>
default:0

Page offset

Required range: 0 <= x <= 10000
start_timestamp
integer<int64>
end_timestamp
integer<int64>
sort_key
enum<string>

Sort key for history endpoints

Available options:
timestamp
sort_dir
enum<string>
Available options:
ASC,
DESC
market
string

Filter by market address

order_type
string

Filter by order type

status
string

Filter by order status

side
enum<string>

Filter by side Order side filter: buy (long) or sell (short). For orders, maps to is_buy column. For trades/funding, maps to action IN ('OpenLong','CloseShort') (buy) or action IN ('CloseLong','OpenShort') (sell).

Available options:
buy,
sell
reduce_only
boolean

Filter by reduce-only flag

Response

Order history retrieved successfully

items
object[]
required

The items in the current page

total_count
integer<int32> | null

The total number of items across all pages. Optional: history endpoints omit this field to avoid expensive COUNT(*) queries.

Required range: x >= 0