HomeDocumentationAPI Reference
Log In
API Reference

Get Option Settlement History

Method Name

public/get_option_settlement_history

Get expired option settlement history, optionally filtered by subaccount or wallet.

Parameters

pageinteger
Page number of results to return (default 1, returns last if above num_pages)
page_sizeinteger
Number of results per page (default 100, max 1000)
subaccount_idinteger
Subaccount ID filter (defaults to all if not provided)
walletstring
Wallet address filter (if set, subaccount_id is ignored)

Response

idstring or integerrequired
resultobjectrequired
result.paginationobjectrequired
Pagination info
result.pagination.countintegerrequired
Total number of items, across all pages
result.pagination.num_pagesintegerrequired
Number of pages
result.settlementsarray of objectsrequired
List of expired option settlements
result.settlements[].amountstringrequired
Amount that was settled
result.settlements[].expiryintegerrequired
Expiry timestamp of the option
result.settlements[].instrument_namestringrequired
Instrument name
result.settlements[].option_settlement_pnlstringrequired
USD profit or loss from option settlements calculated as: settlement value - (average cost including fees x amount)
result.settlements[].option_settlement_pnl_excl_feesstringrequired
USD profit or loss from option settlements calculated as: settlement value - (average price excluding fees x amount)
result.settlements[].settlement_pricestringrequired
Price of option settlement
result.settlements[].subaccount_idintegerrequired
Subaccount ID of the settlement event

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}