Skip to main content
GET
/
api
/
v1
/
twap_history
Get TWAP order history
curl --request GET \
  --url https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_history \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "client_order_id": "client_order_123",
      "duration_s": 300,
      "frequency_s": 30,
      "is_buy": true,
      "is_reduce_only": true,
      "market": "0xmarket123...",
      "order_id": "<string>",
      "orig_size": 123,
      "remaining_size": 123,
      "start_unix_ms": 1730841600000,
      "status": "<string>",
      "transaction_unix_ms": 123,
      "transaction_version": 1
    }
  ],
  "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>

Start timestamp in Unix milliseconds (inclusive). Must be provided together with end_timestamp.

end_timestamp
integer<int64>

End timestamp in Unix milliseconds (inclusive). Must be provided together with start_timestamp.

sort_key
enum<string>

Sort key for history ordering. Defaults to timestamp when omitted. Sort key for history endpoints

Available options:
timestamp
sort_dir
enum<string>

Sort direction for history ordering. Defaults to DESC when omitted.

Available options:
ASC,
DESC

Response

TWAP 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