Skip to main content
GET
/
api
/
v1
/
trade_history
Get user trade history
curl --request GET \
  --url https://api.mainnet.aptoslabs.com/decibel/api/v1/trade_history \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "account": "0x1234567890abcdef1234567890abcdef12345678",
      "action": "buy",
      "client_order_id": "client_order_abc",
      "fee_amount": 123,
      "is_profit": true,
      "is_rebate": true,
      "market": "0xmarket123456789abcdef",
      "order_id": "12345",
      "price": 50000.25,
      "realized_funding_amount": -15.5,
      "realized_pnl_amount": 123,
      "size": 100.5,
      "source": "OrderFill",
      "trade_id": "3647276",
      "transaction_unix_ms": 1634567890000,
      "transaction_version": 3647276285
    }
  ],
  "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

order_id
string

Filter by specific order ID (requires market to also be provided)

market
string

Filter by market address

pagination
object
required

Pagination parameters (limit and offset)

Response

Trade history retrieved successfully

items
object[]
required

The items in the current page

total_count
integer<int32>
required

The total number of items across all pages

Required range: x >= 0