{"openapi":"3.1.0","info":{"title":"nord","version":"21.0.0"},"paths":{"/openapi.json":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApi"}}}}}}},"/schema.proto":{"get":{"responses":{"200":{"description":"plain text","content":{"text/plain; charset=utf-8":{}}}}}},"/live":{"get":{"description":"UNSTABLE: Liveness probe."}},"/health":{"get":{"description":"UNSTABLE: aggregate operational health endpoint.\n\nReturns 503 on any partial degradation. Do not use as a liveness probe.","responses":{"200":{"description":"UNSTABLE: aggregate operational health information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthInfo"}}}},"503":{"description":"UNSTABLE: aggregate operational health information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthInfo"}}}}}}},"/health/{service}":{"get":{"description":"UNSTABLE: operational health endpoint for a single subservice.\n\nReturns 503 only when the named subservice is degraded, so monitors can\nalert per subservice. Do not use as a liveness probe.","parameters":[{"in":"path","name":"service","description":"One of: execution, history, replica, remote, settlement, oracle, rfq.","required":true,"schema":{"description":"One of: execution, history, replica, remote, settlement, oracle, rfq.","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}},"503":{"description":"","content":{"application/json":{"schema":{"type":"null"}}}}}}},"/info":{"get":{"description":"List of markets and tokens.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketsInfo"}}}}}}},"/markets/live":{"get":{"description":"Live market info such as index price, funding rate, and so on.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketsLiveInfo"}}}}}}},"/market/{market_id}/live":{"get":{"description":"Live market info such as index price, funding rate, and so on for a given market.","parameters":[{"in":"path","name":"market_id","required":true,"schema":{"type":"integer","minimum":0,"maximum":2147483647}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketLiveInfo"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketNotFound"}}}}}}},"/action":{"get":{"description":"Query for past executed actions.","parameters":[{"in":"query","name":"from","description":"Start action ID (inclusive)","required":true,"schema":{"description":"Start action ID (inclusive)","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"to","description":"End action ID (inclusive)","required":true,"schema":{"description":"End action ID (inclusive)","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"clientVersion","description":"Optionally provided binary version of client, so nord server can ensure all actions provided are executable by client.","schema":{"description":"Optionally provided binary version of client, so nord server can ensure all actions provided are executable by client.","$ref":"#/components/schemas/ExecutableVersion"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionsItem"}}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RangeTooLarge"}}}},"501":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotImplemented"}}}}}},"post":{"description":"Send an action to nord to execute.\nThis doesn't use `Protobuf<T>` since we want to length-delimit this message.\n`body` - (length prefix of action, action data protobuf, and signature). signature has exact length, but depend on action kind.\nbody is exact payload used via other transports and journalled for rexecution","parameters":[{"in":"header","name":"content-type","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/octet-stream":{}},"required":true},"responses":{"200":{"description":"byte stream","content":{"application/octet-stream":{}}},"415":{"description":"","headers":{"accept":{"description":"Expected request media type","style":"simple","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"string","type":"string"},"example":"application/octet-stream"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedMediaType"}}}},"413":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadTooLarge"}}}}}}},"/action/last-executed-id":{"get":{"description":"Query for the last executed action id.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"integer","format":"uint64","minimum":0}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionNotFound"}}}}}}},"/timestamp":{"get":{"description":"Query for the current logical timestamp of the engine.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Timestamp"}}}}}}},"/event/last-acked-nonce":{"get":{"description":"The last acknowledged event nonce. Use this to ascertain if a given\nwithdrawal was processed by nord.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"integer","format":"uint64","minimum":0}}}}}}},"/ws/{streams}":{"get":{"description":"Websocket subscription to `streams`.","parameters":[{"in":"path","name":"streams","description":"where `streams` is `trades@{symbol} | deltas@{symbol} | account@{account id} | candle@{symbol}:{resolution} [&, ...]`\ne.g. `/ws/trades@BTCUSDC&deltas@BTCUSDC&account@42&candle@BTCUSDC:60`","required":true,"schema":{"description":"where `streams` is `trades@{symbol} | deltas@{symbol} | account@{account id} | candle@{symbol}:{resolution} [&, ...]`\ne.g. `/ws/trades@BTCUSDC&deltas@BTCUSDC&account@42&candle@BTCUSDC:60`","type":"string"}}],"responses":{"101":{"description":"websocket upgrade","headers":{"connection":{"style":"simple","schema":{"type":"string","enum":["upgrade"],"const":"upgrade","example":"upgrade"}},"upgrade":{"style":"simple","schema":{"type":"string","enum":["websocket"],"const":"websocket","example":"websocket"}},"sec-websocket-key":{"style":"simple","schema":{"type":"string"}},"sec-websocket-protocol":{"style":"simple","schema":{"type":"string"}}}}}}},"/market/{market_id}/fees/{fee_kind}/{account_id}":{"get":{"description":"Returns value. If negative, fee is charged from account.","parameters":[{"in":"path","name":"market_id","required":true,"schema":{"type":"integer","minimum":0,"maximum":2147483647}},{"in":"path","name":"fee_kind","required":true,"schema":{"$ref":"#/components/schemas/FillRole"}},{"in":"path","name":"account_id","description":"Account for which evaluate fee for.","required":true,"schema":{"description":"Account for which evaluate fee for.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number","format":"double"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/market/{market_id}/orderbook":{"get":{"description":"Get the orderbook for a given market.","parameters":[{"in":"path","name":"market_id","required":true,"schema":{"type":"integer","minimum":0,"maximum":2147483647}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderbookL2Info"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketNotFound"}}}}}}},"/market/{market_id}/stats":{"get":{"description":"Returns stats for a given market, such as open interest, volume, index price, etc.","parameters":[{"in":"path","name":"market_id","required":true,"schema":{"type":"integer","minimum":0,"maximum":2147483647}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketStats"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketNotFound"}}}}}}},"/tokens/{token_id}/stats":{"get":{"description":"Get the price of a given token.","parameters":[{"in":"path","name":"token_id","required":true,"schema":{"$ref":"#/components/schemas/TokenId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenStats"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenNotFound"}}}}}}},"/user/{pubkey}":{"get":{"description":"List account ids and sessions for a user.","parameters":[{"in":"path","name":"pubkey","description":"User's solana public key","required":true,"schema":{"description":"User's solana public key","allOf":[{"$ref":"#/components/schemas/RegistrationKey"}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/fees/withdrawal":{"get":{"description":"If protocol is healthy, it will be some amount expressed in USDC unit, like 1 USDC or 0.1 USDC.\nFor example if 1 ETH is 10_000 USDC price, and fee 1 USDC, that means that user will get 0.9999 ETH instead of 1 ETH.\n\nIf protocol in unhealthy, withdrawal fee will be proportional to protocol debt.","parameters":[{"in":"path","name":"account_id","description":"Account for which evaluate fee for.","required":true,"schema":{"description":"Account for which evaluate fee for.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number","format":"double"}}}}}}},"/account/{account_id}/orders":{"get":{"description":"Get all orders for a specific account with pagination","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_OrderInfo"}}}}}}},"/account/{account_id}/orders/open":{"get":{"description":"Get all currently open orders for a specific account.\n\nOpen-order membership comes from the in-memory View, while order details come\nfrom the history read replica. Results may therefore lag `/account/{account_id}`\nslightly. This endpoint is intentionally unpaginated; response size scales with\nthe number of markets on which the account has open orders.\n\n`OrderInfo` does not contain View's exact remaining size after non-fill order\nreductions. Clients that need it must join these results by `orderId` with the\nopen orders in `/account/{account_id}`.","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderInfo"}}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}":{"get":{"description":"Given `account_id`, returns account summary information: balances, positions, open orders for account","parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/vaults":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VaultViewState"}}}}}}}},"/vault/{vault_id}":{"get":{"parameters":[{"in":"path","name":"vault_id","required":true,"schema":{"$ref":"#/components/schemas/VaultId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultViewState"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultNotFound"}}}}}}},"/vault/{vault_id}/user/{account_id}":{"get":{"parameters":[{"in":"path","name":"vault_id","required":true,"schema":{"$ref":"#/components/schemas/VaultId"}},{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}}],"responses":{"200":{"description":"Owner share and withdrawal state\n\nWithdrawals are owner side `Q_owner,current`, `Q_owner,previous`, and\n`Q_owner,claimable`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultUserState"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultNotFound"}}}}}}},"/account/{account_id}/vault-user-states":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountVaultUserStateInfo"}}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/history/pnl":{"get":{"description":"Fetch full history of PnL updates for an account.","parameters":[{"in":"path","name":"account_id","description":"Account for which to retrieve PnL history","required":true,"schema":{"description":"Account for which to retrieve PnL history","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","$ref":"#/components/schemas/ActionIdSubActionIdMarketIdCursor"}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}},{"in":"query","name":"marketId","description":"Optional market filter by market id.","schema":{"description":"Optional market filter by market id.","type":"integer","minimum":0,"maximum":2147483647,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_ActionIdSubActionIdMarketIdCursor_and_AccountPnlInfo"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/history/position":{"get":{"description":"Fetch full history of position updates for an account.","parameters":[{"in":"path","name":"account_id","description":"Account for which to retrieve position history","required":true,"schema":{"description":"Account for which to retrieve position history","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","$ref":"#/components/schemas/ActionIdSubActionIdMarketIdCursor"}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}},{"in":"query","name":"marketId","description":"Optional market filter by market id.","schema":{"description":"Optional market filter by market id.","type":"integer","minimum":0,"maximum":2147483647,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_ActionIdSubActionIdMarketIdCursor_and_AccountPositionHistoryInfo"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/pnl/summary":{"get":{"description":"Fetch cumulative PnL totals for an account over a time window.","parameters":[{"in":"path","name":"account_id","description":"Account for which to retrieve PnL totals.","required":true,"schema":{"description":"Account for which to retrieve PnL totals.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"marketId","description":"Optional market filter by market id.","schema":{"description":"Optional market filter by market id.","type":"integer","minimum":0,"maximum":2147483647,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPnlSummaryResult"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/position/summary":{"get":{"description":"fetch per-market realized trading pnl and funding pnl for an account.\n\nfunding pnl includes since-change, since-open, and all-time values at the\nreturned cumulative-materializer progress.","parameters":[{"in":"path","name":"account_id","description":"account for which to retrieve the position summary.","required":true,"schema":{"description":"account for which to retrieve the position summary.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"marketId","description":"Optional market filter by market id.","schema":{"description":"Optional market filter by market id.","type":"integer","minimum":0,"maximum":2147483647,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPositionSummaryResult"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/history/funding":{"get":{"description":"Fetch full history of funding payments for an account.","parameters":[{"in":"path","name":"account_id","description":"Account for which to retrieve funding history","required":true,"schema":{"description":"Account for which to retrieve funding history","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"string"}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}},{"in":"query","name":"marketId","description":"Optional market filter by market id.","schema":{"description":"Optional market filter by market id.","type":"integer","minimum":0,"maximum":2147483647,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_string_and_AccountFundingInfo"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/history/fee-tier":{"get":{"description":"Fetch full history of fee-tier assignment changes for an account.","parameters":[{"in":"path","name":"account_id","description":"Account ID for which to fetch fee-tier history.","required":true,"schema":{"description":"Account ID for which to fetch fee-tier history.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_AccountFeeTierHistory"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/triggers/history/placements":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","$ref":"#/components/schemas/TriggerHistCursor"}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_TriggerHistCursor_and_PlaceTriggerRow"}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}}}}},"/account/{account_id}/triggers/history/finalisations":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"string","minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_TriggerId_and_FinaliseTriggerRow"}}}}}}},"/account/{account_id}/triggers":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FullTriggerOrder"}}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/accounts/count":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"integer","format":"uint","minimum":0}}}}}}},"/account/{account_id}/pubkey":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}}],"responses":{"200":{"description":"Solana base58 address with private key (must have private side so that can create session after).\nBasically fix for solana-pubkey is array of bytes in serde https://github.com/anza-xyz/solana-sdk/pull/76","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationKey"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/order/{order_id}":{"get":{"description":"Given order identifier, return order summary.\nWorks for order which were immediately filled, partially filled, cancelled or fully filled.","parameters":[{"in":"path","name":"order_id","required":true,"schema":{"type":"integer","format":"uint64","minimum":0}}],"responses":{"200":{"description":"Order summary.\nUse order_id to application side join with trades as needed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderInfo"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNotFound"}}}}}}},"/order/{order_id}/trades":{"get":{"description":"Get trades for a specific order with pagination","parameters":[{"in":"path","name":"order_id","required":true,"schema":{"type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_Trade"}}}}}}},"/trades":{"get":{"description":"Ordered from present to past.\n\nPagination\nBesides set of trades in `trades` array, endpoint returns `accountId` and actual values for `since` and `until`\nif they weren't specified by client.\n\nTo fetch it, client should pass `since` and `until` returned and add `nextStartInclusive`'s value as `startInclusive` parameter.\nBy default, `startInclusive` and `nextStartInclusive` are trade ids. When `paginationMode=actionId`,\nthey are action ids, and `pageSize` counts distinct action ids instead of individual trade rows.\nIf `nextStartInclusive` is absent, it means there's no more data to fetch, even if 50 entries were returned.","parameters":[{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}},{"in":"query","name":"paginationMode","schema":{"$ref":"#/components/schemas/TradesPaginationMode","default":"tradeId"}},{"in":"query","name":"takerId","schema":{"default":null,"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"takerSide","schema":{"default":null,"$ref":"#/components/schemas/Side"}},{"in":"query","name":"makerId","schema":{"default":null,"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"marketId","schema":{"type":"integer","format":"uint32","minimum":0,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_Trade"}}}}}}},"/state/download":{"get":{"description":"Returns state download link and metadata,\nas defined by nearest(up to equality) snapshot `time` or `action_id`` or `timestamp`.\nIf not specified, returns latest snapshot.\nExample: /state/download?actionId=1\n         /state/download?time&2025-09-22T12:34:56Z\n         /state/download?timestamp&1695380000 - Does not implemented yet.\nTo get the latest snap use:\n         /state/download - w/o any params.\n\nThe link from responce can be inserted to search bar in browser to download.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateDownloadMeta"}}}},"501":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotImplemented"}}}}}}},"/state/download/{snapshot_id}":{"get":{"description":"Typical HTTP file download endpoint.\nActually same as provided by S3 storages.\nMeans supports Range header, Content-Length, Content-Type, ETag and so on,\nand relevant headers.","parameters":[{"in":"path","name":"snapshot_id","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotNotFound"}}}}}}},"/state/info":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateInfo"}}}}}}},"/state/info/hist":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateHistInfo"}}}}}}},"/fee/brackets/info":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/FeeTierId"},{"$ref":"#/components/schemas/FeeTierConfig"}],"minItems":2,"maxItems":2}}}}}}}},"/account/{account_id}/fee/tier":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeTierId"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/accounts/fee-tiers":{"get":{"description":"List fee tiers assigned to accounts.","parameters":[{"in":"query","name":"tier","schema":{"default":null,"$ref":"#/components/schemas/FeeTierId"}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_AccountId_and_AccountFeeTier"}}}}}}},"/admin":{"get":{"description":"List of assigned admins.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminInfo"}}}}}}}},"/account/volume":{"get":{"description":"Get trading volume for an account\n\nOptionally, you can specify a market to get volume for.\nIf not specified, array of (MarketIdDeprecated, Volume) is returned.\n\nReturns raw values, caller must rescale to base token decimals","parameters":[{"in":"query","name":"accountId","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"marketId","description":"DEPRECATED, use `market_ids` instead.","schema":{"description":"DEPRECATED, use `market_ids` instead.","type":"integer","minimum":0,"maximum":2147483647}},{"in":"query","name":"marketIds","schema":{"type":"array","items":{"type":"integer","minimum":0,"maximum":2147483647},"default":""}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountVolumeInfo"}}}}},"400":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/history/withdrawal":{"get":{"description":"Fetch full history of withdrawals for an account.","parameters":[{"in":"path","name":"account_id","description":"Account ID for which to fetch withdrawal history.","required":true,"schema":{"description":"Account ID for which to fetch withdrawal history.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_WithdrawalInfo"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/history/deposit":{"get":{"description":"Fetch full history of deposits for an account.","parameters":[{"in":"path","name":"account_id","description":"Account ID for which to fetch deposit history.","required":true,"schema":{"description":"Account ID for which to fetch deposit history.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_DepositInfo"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/{account_id}/history/transfer":{"get":{"description":"Fetch full history of transfers for an account (both sent and received).","parameters":[{"in":"path","name":"account_id","description":"Account ID for which to fetch transfer history.","required":true,"schema":{"description":"Account ID for which to fetch transfer history.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_TransferRow"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/vault/{vault_id}/history/config":{"get":{"parameters":[{"in":"path","name":"vault_id","required":true,"schema":{"$ref":"#/components/schemas/VaultId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_VaultConfigRow"}}}}}}},"/vault/{vault_id}/history/deposit":{"get":{"parameters":[{"in":"path","name":"vault_id","required":true,"schema":{"$ref":"#/components/schemas/VaultId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_VaultDepositRow"}}}}}}},"/vault/{vault_id}/history/withdrawal":{"get":{"parameters":[{"in":"path","name":"vault_id","required":true,"schema":{"$ref":"#/components/schemas/VaultId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_VaultWithdrawalRow"}}}}}}},"/vault/{vault_id}/history/epoch":{"get":{"parameters":[{"in":"path","name":"vault_id","required":true,"schema":{"$ref":"#/components/schemas/VaultId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_VaultEpochHistoryInfo"}}}}}}},"/account/{account_id}/history/vault/deposit":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_VaultDepositRow"}}}}}}},"/account/{account_id}/history/vault/withdrawal":{"get":{"parameters":[{"in":"path","name":"account_id","required":true,"schema":{"$ref":"#/components/schemas/AccountId"}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_VaultWithdrawalRow"}}}}}}},"/account/system/history/transfer":{"get":{"description":"Fetch full history of transfers involving the fee vault.","parameters":[{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_TransferRow"}}}}}}},"/account/{account_id}/history/liquidation":{"get":{"description":"Fetch full history of liquidations for an account.","parameters":[{"in":"path","name":"account_id","description":"Account ID for which to fetch liquidation history.","required":true,"schema":{"description":"Account ID for which to fetch liquidation history.","allOf":[{"$ref":"#/components/schemas/AccountId"}]}},{"in":"query","name":"since","description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","schema":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null}},{"in":"query","name":"until","description":"end with this timestamp (RFC3339); defaults to current date-time","schema":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null}},{"in":"query","name":"startInclusive","description":"fetch results starting with this page; query starts with first entry if page isn't specified","schema":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":"integer","format":"uint64","minimum":0}},{"in":"query","name":"pageSize","description":"Query returns up to 50 trades in one go.","schema":{"description":"Query returns up to 50 trades in one go.","type":"integer","format":"uint8","minimum":1,"maximum":255,"default":null}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_LiquidationInfo"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotFound"}}}}}}},"/account/system":{"get":{"description":"Special account fee vault.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemBalances"}}}}}}},"/accounts/liquidations/takes":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TakeAllInfo"}}}}}}}},"/tv":{"get":{"description":"Datafeed URL to be used in TradingView","responses":{"200":{"description":"plain text","content":{"text/plain; charset=utf-8":{}}}}}},"/market/{market_id}/history/PT1H":{"get":{"description":"Gets market updates history for some period of time.\nDefault is hourly for last 24 hours","parameters":[{"in":"path","name":"market_id","required":true,"schema":{"type":"integer","minimum":0,"maximum":2147483647}},{"in":"query","name":"startInclusive","schema":{"type":"integer","format":"uint64","minimum":0,"default":null}},{"in":"query","name":"pageSize","schema":{"type":"integer","format":"uint8","minimum":1,"maximum":255,"default":24}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResult_for_uint64_and_MarketHistoryInfo"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketNotFound"}}}}}}}},"components":{"schemas":{"OpenApi":{"type":"object","properties":{"openapi":{"type":"string"},"info":{"description":"REQUIRED. Provides metadata about the API.\nThe metadata MAY be used by tooling as required.","allOf":[{"$ref":"#/components/schemas/Info"}]},"jsonSchemaDialect":{"description":"The default value for the `$schema` keyword within Schema Objects\ncontained within this OAS document. This MUST be in the form of a URI.","type":["string","null"]},"servers":{"description":"An array of Server Objects, which provide connectivity information to a\ntarget server. If the servers property is not provided, or is an empty\narray, the default value would be a Server Object with a url value of /.","type":"array","items":{"$ref":"#/components/schemas/Server"}},"paths":{"description":"The available paths and operations for the API.","anyOf":[{"$ref":"#/components/schemas/Paths"},{"type":"null"}]},"webhooks":{"description":"The incoming webhooks that MAY be received as part of this API and that\nthe API consumer MAY choose to implement. Closely related to the\n`callbacks` feature, this section describes requests initiated other\nthan by an API call, for example by an out of band registration. The key\nname is a unique string to refer to each webhook, while the (optionally\nreferenced) Path Item Object describes a request that may be initiated\nby the API provider and the expected responses.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr"}},"components":{"description":"An element to hold various schemas for the document.","anyOf":[{"$ref":"#/components/schemas/Components"},{"type":"null"}]},"security":{"description":"A declaration of which security mechanisms can be used across the API.\n\nThe list of values includes alternative security requirement objects\nthat can be used. Only one of the security requirement objects need to\nbe satisfied to authorize a request. Individual operations can override\nthis definition. Global security settings may be overridden on a\nper-path basis.","type":"array","items":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"tags":{"description":"A list of tags used by the document with additional metadata.\n\nThe order of the tags can be used to reflect on their order by the\nparsing tools. Not all tags that are used by the Operation Object\nmust be declared. The tags that are not declared MAY be organized\nrandomly or based on the tool's logic. Each tag name in the list\nMUST be unique.","type":"array","items":{"$ref":"#/components/schemas/Tag"}},"externalDocs":{"description":"Additional external documentation.","anyOf":[{"$ref":"#/components/schemas/ExternalDocumentation"},{"type":"null"}]}},"required":["openapi","info"],"additionalProperties":true},"Info":{"description":"The object provides metadata about the API.\nThe metadata MAY be used by the clients if needed,\nand MAY be presented in editing or documentation generation tools for\nconvenience.","type":"object","properties":{"title":{"description":"REQUIRED. The title of the application.","type":"string"},"summary":{"description":"A short summary of the API.","type":["string","null"]},"description":{"description":"A description of the API.\nCommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"termsOfService":{"description":"A URL to the Terms of Service for the API.\nThis MUST be in the format of a URL.","type":["string","null"]},"contact":{"description":"The contact information for the exposed API.","anyOf":[{"$ref":"#/components/schemas/Contact"},{"type":"null"}]},"license":{"description":"The license information for the exposed API.","anyOf":[{"$ref":"#/components/schemas/License"},{"type":"null"}]},"version":{"description":"REQUIRED. The version of the OpenAPI document (which is distinct from\nthe OpenAPI Specification version or the API implementation version).","type":"string"}},"required":["title","version"],"additionalProperties":true},"Contact":{"description":"Contact information for the exposed API.","type":"object","properties":{"name":{"description":"The identifying name of the contact person/organization.","type":["string","null"]},"url":{"description":"The URL pointing to the contact information.\nThis MUST be in the format of a URL.","type":["string","null"]},"email":{"description":"The email address of the contact person/organization.\nThis MUST be in the format of an email address.","type":["string","null"]}},"additionalProperties":true},"License":{"description":"License information for the exposed API.","type":"object","properties":{"name":{"description":"REQUIRED. The license name used for the API.","type":"string"},"identifier":{"description":"An [SPDX](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60) license expression for the API. The `identifier` field is mutually exclusive of the `url` field.","type":["string","null"]},"url":{"description":"A URL to the license used for the API. This MUST be in the form of a\nURL. The `url` field is mutually exclusive of the `identifier` field.","type":["string","null"]}},"required":["name"],"additionalProperties":true},"Server":{"description":"An object representing a Server.","type":"object","properties":{"url":{"description":"REQUIRED. A URL to the target host.\nThis URL supports Server Variables and MAY be relative,\nto indicate that the host location is relative to the\nlocation where the OpenAPI document is being served.\nVariable substitutions will be made when a variable\nis named in {brackets}.","type":"string"},"description":{"description":"An optional string describing the host designated\nby the URL. CommonMark syntax MAY be used for rich\ntext representation.","type":["string","null"]},"variables":{"description":"A map between a variable name and its value.\nThe value is used for substitution in the server's URL template.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ServerVariable"}}},"required":["url"],"additionalProperties":true},"ServerVariable":{"description":"An object representing a Server Variable\nfor server URL template substitution.","type":"object","properties":{"enum":{"description":"An enumeration of string values to be\nused if the substitution options are from a limited set.","type":"array","items":{"type":"string"}},"default":{"description":"REQUIRED. The default value to use for substitution,\nand to send, if an alternate value is not supplied.\nUnlike the Schema Object's default, this value MUST\nbe provided by the consumer.","type":"string"},"description":{"description":"An optional description for the server\nvariable. CommonMark syntax MAY be used\nfor rich text representation.","type":["string","null"]}},"required":["default"],"additionalProperties":true},"Paths":{"description":"Holds the relative paths to the individual endpoints and\ntheir operations. The path is appended to the URL from the\nServer Object in order to construct the full URL. The Paths\nMAY be empty, due to Access Control List (ACL) constraints.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr"}},"ReferenceOr":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/PathItem"}]},"PathItem":{"description":"Describes the operations available on a single path.\nA Path Item MAY be empty, due to ACL constraints.\nThe path itself is still exposed to the documentation\nviewer but they will not know which operations and\nparameters are available.","type":"object","properties":{"$ref":{"description":"Allows for a referenced definition of this path item. The referenced\nstructure MUST be in the form of a Path Item Object.  In case a Path\nItem Object field appears both in the defined object and the referenced\nobject, the behavior is undefined. See the rules for resolving Relative\nReferences.","type":["string","null"]},"summary":{"description":"An optional, string summary, intended to apply to all operations in\nthis path.","type":["string","null"]},"description":{"description":"An optional, string description, intended to apply to all operations in\nthis path. CommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"get":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"put":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"post":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"delete":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"options":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"head":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"patch":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"trace":{"anyOf":[{"$ref":"#/components/schemas/Operation"},{"type":"null"}]},"servers":{"description":"An alternative server array to service all operations in this path.","type":"array","items":{"$ref":"#/components/schemas/Server"}},"parameters":{"description":"A list of parameters that are applicable for all the\noperations described under this path. These parameters\ncan be overridden at the operation level, but cannot be\nremoved there. The list MUST NOT include duplicated parameters.\nA unique parameter is defined by a combination of a name and location.\nThe list can use the Reference Object to link to parameters that\nare defined at the OpenAPI Object's components/parameters.","type":"array","items":{"$ref":"#/components/schemas/ReferenceOr2"}}},"additionalProperties":true},"Operation":{"description":"Describes a single API operation on a path.","type":"object","properties":{"tags":{"description":"A list of tags for API documentation control.\nTags can be used for logical grouping of operations\nby resources or any other qualifier.","type":"array","items":{"type":"string"}},"summary":{"description":"A short summary of what the operation does.","type":["string","null"]},"description":{"description":"A verbose explanation of the operation behavior.\nCommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"externalDocs":{"description":"Additional external documentation for this operation.","anyOf":[{"$ref":"#/components/schemas/ExternalDocumentation"},{"type":"null"}]},"operationId":{"description":"Unique string used to identify the operation.\nThe id MUST be unique among all operations described in the API.\nTools and libraries MAY use the operationId to uniquely identify\nan operation, therefore, it is RECOMMENDED to follow common\nprogramming naming conventions.","type":["string","null"]},"parameters":{"description":"A list of parameters that are applicable for this operation.\nIf a parameter is already defined at the Path Item, the new\ndefinition will override it but can never remove it.\nThe list MUST NOT include duplicated parameters. A unique\nparameter is defined by a combination of a name and location.\nThe list can use the Reference Object to link to parameters\nthat are defined at the OpenAPI Object's components/parameters.","type":"array","items":{"$ref":"#/components/schemas/ReferenceOr2"}},"requestBody":{"description":"The request body applicable for this operation.\nThe requestBody is fully supported in HTTP methods\nwhere the HTTP 1.1 specification RFC7231 has explicitly\ndefined semantics for request bodies. In other cases where\nthe HTTP spec is vague (such as\n[GET](https://tools.ietf.org/html/rfc7231#section-4.3.1),\n[HEAD](https://tools.ietf.org/html/rfc7231#section-4.3.2) and\n[DELETE](https://tools.ietf.org/html/rfc7231#section-4.3.5)),\nrequestBody is permitted but does not have well-defined semantics and\nSHOULD be avoided if possible.","anyOf":[{"$ref":"#/components/schemas/ReferenceOr5"},{"type":"null"}]},"responses":{"description":"The list of possible responses as they are returned\nfrom executing this operation.","anyOf":[{"$ref":"#/components/schemas/Responses"},{"type":"null"}]},"deprecated":{"description":"Declares this operation to be deprecated.Default value is false.","type":"boolean"},"security":{"description":"A declaration of which security mechanisms can be used for this\noperation. The list of values includes alternative security\nrequirement objects that can be used. Only one of the security\nrequirement objects need to be satisfied to authorize a request.\nThis definition overrides any declared top-level security. To remove\na top-level security declaration, an empty array can be used.","type":"array","items":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"servers":{"description":"An alternative server array to service this operation.\nIf an alternative server object is specified at the\nPath Item Object or Root level, it will be overridden by this value.","type":"array","items":{"$ref":"#/components/schemas/Server"}},"callbacks":{"description":"Callbacks for the operation.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr8"}}},"additionalProperties":true},"ExternalDocumentation":{"description":"Allows referencing an external resource for extended documentation.","type":"object","properties":{"description":{"description":"A description of the target documentation.\nCommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"url":{"description":"REQUIRED. The URL for the target documentation.\nThis MUST be in the format of a URL.","type":"string"}},"required":["url"],"additionalProperties":true},"ReferenceOr2":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/Parameter"}]},"Parameter":{"oneOf":[{"description":"Describes a single operation parameter.\n\nA unique parameter is defined by a combination of a name and location.","type":"object","properties":{"name":{"description":"REQUIRED. The name of the parameter. Parameter names are case sensitive.\nIf in is \"path\", the name field MUST correspond to the associated path\nsegment from the path field in the Paths Object. See Path Templating for\nfurther information.\n\nIf in is \"header\" and the name field is \"Accept\", \"Content-Type\" or\n\"Authorization\", the parameter definition SHALL be ignored.\n\nFor all other cases, the name corresponds to the parameter name\nused by the in property.","type":"string"},"description":{"description":"A brief description of the parameter. This could\ncontain examples of use. CommonMark syntax MAY be\nused for rich text representation.","type":["string","null"]},"required":{"description":"Determines whether this parameter is mandatory.\nIf the parameter location is \"path\", this property\nis REQUIRED and its value MUST be true. Otherwise,\nthe property MAY be included and its default value\nis false.","type":"boolean"},"deprecated":{"description":"Specifies that a parameter is deprecated and SHOULD\nbe transitioned out of usage.","type":["boolean","null"]},"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr3"}},"explode":{"type":["boolean","null"]},"allow_reserved":{"description":"Determines whether the parameter value SHOULD allow reserved\ncharacters, as defined by RFC3986 :/?#[]@!$&'()*+,;= to be included\nwithout percent-encoding. This property only applies to parameters\nwith an in value of query. The default value is false.","type":"boolean"},"style":{"description":"Describes how the parameter value will be serialized depending on\nthe type of the parameter value. Default values (based on value of\nin): for query - form; for path - simple; for header - simple; for\ncookie - form.","allOf":[{"$ref":"#/components/schemas/QueryStyle"}]},"allow_empty_value":{"description":"Sets the ability to pass empty-valued parameters. This is\nvalid only for query parameters and allows sending a parameter\nwith an empty value. Default value is false. If style is used,\nand if behavior is n/a (cannot be serialized), the value of\nallowEmptyValue SHALL be ignored.","type":["boolean","null"]},"in":{"type":"string","const":"query"},"content":true,"schema":true},"required":["in","name"],"oneOf":[{"description":"The schema defining the type used for the parameter.","type":"object","properties":{"schema":{"$ref":"#/components/schemas/SchemaObject"}},"required":["schema"]},{"description":"A map containing the representations for the parameter. The key is the\nmedia type and the value describes it. The map MUST only contain one\nentry.","type":"object","properties":{"content":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaType"}}},"required":["content"]}],"additionalProperties":true},{"description":"Describes a single operation parameter.\n\nA unique parameter is defined by a combination of a name and location.","type":"object","properties":{"name":{"description":"REQUIRED. The name of the parameter. Parameter names are case sensitive.\nIf in is \"path\", the name field MUST correspond to the associated path\nsegment from the path field in the Paths Object. See Path Templating for\nfurther information.\n\nIf in is \"header\" and the name field is \"Accept\", \"Content-Type\" or\n\"Authorization\", the parameter definition SHALL be ignored.\n\nFor all other cases, the name corresponds to the parameter name\nused by the in property.","type":"string"},"description":{"description":"A brief description of the parameter. This could\ncontain examples of use. CommonMark syntax MAY be\nused for rich text representation.","type":["string","null"]},"required":{"description":"Determines whether this parameter is mandatory.\nIf the parameter location is \"path\", this property\nis REQUIRED and its value MUST be true. Otherwise,\nthe property MAY be included and its default value\nis false.","type":"boolean"},"deprecated":{"description":"Specifies that a parameter is deprecated and SHOULD\nbe transitioned out of usage.","type":["boolean","null"]},"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr3"}},"explode":{"type":["boolean","null"]},"style":{"description":"Describes how the parameter value will be serialized depending on\nthe type of the parameter value. Default values (based on value of\nin): for query - form; for path - simple; for header - simple; for\ncookie - form.","allOf":[{"$ref":"#/components/schemas/HeaderStyle"}]},"in":{"type":"string","const":"header"},"content":true,"schema":true},"required":["in","name"],"oneOf":[{"description":"The schema defining the type used for the parameter.","type":"object","properties":{"schema":{"$ref":"#/components/schemas/SchemaObject"}},"required":["schema"]},{"description":"A map containing the representations for the parameter. The key is the\nmedia type and the value describes it. The map MUST only contain one\nentry.","type":"object","properties":{"content":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaType"}}},"required":["content"]}],"additionalProperties":true},{"description":"Describes a single operation parameter.\n\nA unique parameter is defined by a combination of a name and location.","type":"object","properties":{"name":{"description":"REQUIRED. The name of the parameter. Parameter names are case sensitive.\nIf in is \"path\", the name field MUST correspond to the associated path\nsegment from the path field in the Paths Object. See Path Templating for\nfurther information.\n\nIf in is \"header\" and the name field is \"Accept\", \"Content-Type\" or\n\"Authorization\", the parameter definition SHALL be ignored.\n\nFor all other cases, the name corresponds to the parameter name\nused by the in property.","type":"string"},"description":{"description":"A brief description of the parameter. This could\ncontain examples of use. CommonMark syntax MAY be\nused for rich text representation.","type":["string","null"]},"required":{"description":"Determines whether this parameter is mandatory.\nIf the parameter location is \"path\", this property\nis REQUIRED and its value MUST be true. Otherwise,\nthe property MAY be included and its default value\nis false.","type":"boolean"},"deprecated":{"description":"Specifies that a parameter is deprecated and SHOULD\nbe transitioned out of usage.","type":["boolean","null"]},"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr3"}},"explode":{"type":["boolean","null"]},"style":{"description":"Describes how the parameter value will be serialized depending on\nthe type of the parameter value. Default values (based on value of\nin): for query - form; for path - simple; for header - simple; for\ncookie - form.","allOf":[{"$ref":"#/components/schemas/PathStyle"}]},"in":{"type":"string","const":"path"},"content":true,"schema":true},"required":["in","name"],"oneOf":[{"description":"The schema defining the type used for the parameter.","type":"object","properties":{"schema":{"$ref":"#/components/schemas/SchemaObject"}},"required":["schema"]},{"description":"A map containing the representations for the parameter. The key is the\nmedia type and the value describes it. The map MUST only contain one\nentry.","type":"object","properties":{"content":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaType"}}},"required":["content"]}],"additionalProperties":true},{"description":"Describes a single operation parameter.\n\nA unique parameter is defined by a combination of a name and location.","type":"object","properties":{"name":{"description":"REQUIRED. The name of the parameter. Parameter names are case sensitive.\nIf in is \"path\", the name field MUST correspond to the associated path\nsegment from the path field in the Paths Object. See Path Templating for\nfurther information.\n\nIf in is \"header\" and the name field is \"Accept\", \"Content-Type\" or\n\"Authorization\", the parameter definition SHALL be ignored.\n\nFor all other cases, the name corresponds to the parameter name\nused by the in property.","type":"string"},"description":{"description":"A brief description of the parameter. This could\ncontain examples of use. CommonMark syntax MAY be\nused for rich text representation.","type":["string","null"]},"required":{"description":"Determines whether this parameter is mandatory.\nIf the parameter location is \"path\", this property\nis REQUIRED and its value MUST be true. Otherwise,\nthe property MAY be included and its default value\nis false.","type":"boolean"},"deprecated":{"description":"Specifies that a parameter is deprecated and SHOULD\nbe transitioned out of usage.","type":["boolean","null"]},"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr3"}},"explode":{"type":["boolean","null"]},"style":{"description":"Describes how the parameter value will be serialized depending on\nthe type of the parameter value. Default values (based on value of\nin): for query - form; for path - simple; for header - simple; for\ncookie - form.","allOf":[{"$ref":"#/components/schemas/CookieStyle"}]},"in":{"type":"string","const":"cookie"},"content":true,"schema":true},"required":["in","name"],"oneOf":[{"description":"The schema defining the type used for the parameter.","type":"object","properties":{"schema":{"$ref":"#/components/schemas/SchemaObject"}},"required":["schema"]},{"description":"A map containing the representations for the parameter. The key is the\nmedia type and the value describes it. The map MUST only contain one\nentry.","type":"object","properties":{"content":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaType"}}},"required":["content"]}],"additionalProperties":true}]},"SchemaObject":{"type":"object","properties":{"externalDocs":{"description":"Additional external documentation for this schema.","anyOf":[{"$ref":"#/components/schemas/ExternalDocumentation"},{"type":"null"}]},"example":{"description":"A free-form property to include an example of an instance for this\nschema. To represent examples that cannot be naturally represented in\nJSON or YAML, a string value can be used to contain the example with\nescaping where necessary. **Deprecated:** The `example` property has\nbeen deprecated in favor of the JSON Schema `examples` keyword. Use\nof `example` is discouraged, and later versions of this\nspecification may remove it."}}},"MediaType":{"type":"object","properties":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SchemaObject"},{"type":"null"}]},"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr3"}},"encoding":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Encoding"}}},"additionalProperties":true},"ReferenceOr3":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/Example"}]},"Example":{"type":"object","properties":{"summary":{"description":"Short description for the example.","type":["string","null"]},"description":{"description":"Long description for the example.\nCommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"value":{"description":"Embedded literal example. The `value` field and `externalValue`\nfield are mutually exclusive. To represent examples of\nmedia types that cannot naturally represented in JSON or YAML,\nuse a string value to contain the example, escaping where necessary."},"externalValue":{"description":"A URI that points to the literal example.\nThis provides the capability to reference examples that cannot\neasily be included in JSON or YAML documents. The `value` field and\n`externalValue` field are mutually exclusive. See the rules for\nresolving Relative References.","type":["string","null"]}},"additionalProperties":true},"Encoding":{"description":"A single encoding definition applied to a single schema property.","type":"object","properties":{"contentType":{"description":"The Content-Type for encoding a specific property.\nDefault value depends on the property type:\nfor object - application/json;\nfor array – the default is defined based on the inner type.\nfor all other cases the default is `application/octet-stream`.\nThe value can be a specific media type (e.g. application/json),\na wildcard media type (e.g. image/*), or a comma-separated list of the\ntwo types.","type":["string","null"]},"headers":{"description":"A map allowing additional information to be provided as headers,\nfor example Content-Disposition. Content-Type is described separately\nand SHALL be ignored in this section. This property SHALL be ignored\nif the request body media type is not a multipart.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr4"}},"style":{"description":"Describes how a specific property value will be serialized depending\non its type. See Parameter Object for details on the style property.\nThe behavior follows the same values as query parameters, including\ndefault values. This property SHALL be ignored if the request body\nmedia type is not application/x-www-form-urlencoded  or\nmultipart/form-data. If a value is explicitly defined, then the value of\n`contentType` (implicit or explicit) SHALL be ignored.","anyOf":[{"$ref":"#/components/schemas/QueryStyle"},{"type":"null"}]},"explode":{"description":"When this is true, property values of type array or object generate\nseparate parameters for each value of the array, or key-value-pair\nof the map. For other types of properties this property has no effect.\nWhen style is form, the default value is true.\nFor all other styles, the default value is false. This property\nSHALL be ignored if the request body media type is\nnot application/x-www-form-urlencoded or multipart/form-data. If a value\nis explicitly defined, then the value of `contentType` (implicit or\nexplicit) SHALL be ignored.\n\nIn this Library this value defaults to false always despite the\nspecification.","type":"boolean"},"allowReserved":{"description":"Determines whether the parameter value SHOULD allow reserved characters,\nas defined by RFC3986 :/?#[]@!$&'()*+,;= to be included without\npercent-encoding. The default value is false. This property SHALL be\nignored if the request body media type is not\napplication/x-www-form-urlencoded or multipart/form-data. If a value is\nexplicitly defined, then the value of `contentType` (implicit or\nexplicit) SHALL be ignored.","type":"boolean"}},"additionalProperties":true},"ReferenceOr4":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/Header"}]},"Header":{"description":"The Header Object follows the structure of the Parameter Object with the\nfollowing changes:\n\n1) name MUST NOT be specified, it is given in the corresponding headers map.\n2) in MUST NOT be specified, it is implicitly in header.\n3) All traits that are affected by the location MUST be applicable to a\nlocation of header (for example, style).","type":"object","properties":{"description":{"description":"A brief description of the parameter. This could\ncontain examples of use. CommonMark syntax MAY be\nused for rich text representation.","type":["string","null"]},"style":{"default":"simple","allOf":[{"$ref":"#/components/schemas/HeaderStyle"}]},"required":{"description":"Determines whether this parameter is mandatory.\nIf the parameter location is \"path\", this property\nis REQUIRED and its value MUST be true. Otherwise,\nthe property MAY be included and its default value\nis false.","type":"boolean"},"deprecated":{"description":"Specifies that a parameter is deprecated and SHOULD\nbe transitioned out of usage.","type":["boolean","null"]},"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr3"}},"content":true,"schema":true},"oneOf":[{"description":"The schema defining the type used for the parameter.","type":"object","properties":{"schema":{"$ref":"#/components/schemas/SchemaObject"}},"required":["schema"]},{"description":"A map containing the representations for the parameter. The key is the\nmedia type and the value describes it. The map MUST only contain one\nentry.","type":"object","properties":{"content":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaType"}}},"required":["content"]}],"additionalProperties":true},"HeaderStyle":{"type":"string","enum":["simple"]},"QueryStyle":{"type":"string","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"PathStyle":{"type":"string","enum":["matrix","label","simple"]},"CookieStyle":{"type":"string","enum":["form"]},"ReferenceOr5":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/RequestBody"}]},"RequestBody":{"type":"object","properties":{"description":{"description":"A brief description of the request body.\nThis could contain examples of use.\nCommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"content":{"description":"REQUIRED. The content of the request body.\nThe key is a media type or media type range and\nthe value describes it. For requests that match\nmultiple keys, only the most specific key is applicable.\n e.g. text/plain overrides text/*","type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaType"}},"required":{"description":"Determines if the request body is required in the\nrequest. Defaults to false.","type":"boolean"}},"additionalProperties":true},"Responses":{"type":"object","properties":{"default":{"description":"The documentation of responses other than the ones declared\nfor specific HTTP response codes. Use this field to cover\nundeclared responses.","anyOf":[{"$ref":"#/components/schemas/ReferenceOr6"},{"type":"null"}]}},"additionalProperties":{"$ref":"#/components/schemas/ReferenceOr6"}},"ReferenceOr6":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/Response"}]},"Response":{"type":"object","properties":{"description":{"description":"REQUIRED. A description of the response.\nCommonMark syntax MAY be used for rich text representation.","type":"string"},"headers":{"description":"Maps a header name to its definition.\nRFC7230 states header names are case insensitive.\nIf a response header is defined with the name \"Content-Type\",\nit SHALL be ignored.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr4"}},"content":{"description":"A map containing descriptions of potential response payloads.\nThe key is a media type or media type range and the value\ndescribes it. For responses that match multiple keys,\nonly the most specific key is applicable. e.g. text/plain\noverrides text/*","type":"object","additionalProperties":{"$ref":"#/components/schemas/MediaType"}},"links":{"description":"A map of operations links that can be followed from the response.\nThe key of the map is a short name for the link, following\nthe naming constraints of the names for Component Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr7"}}},"required":["description"],"additionalProperties":true},"ReferenceOr7":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/Link"}]},"Link":{"description":"The Link object represents a possible design-time link for a response.\nThe presence of a link does not guarantee the caller's ability to\nsuccessfully invoke it, rather it provides a known relationship and\ntraversal mechanism between responses and other operations.\n\nUnlike dynamic links (i.e. links provided in the response payload),\nthe OAS linking mechanism does not require link information in the runtime\nresponse.\n\nFor computing links, and providing instructions to execute them,\na runtime expression is used for accessing values in an operation\nand using them as parameters while invoking the linked operation.","type":"object","properties":{"description":{"description":"A description of the link.\nCommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"requestBody":{"description":"A literal value or {expression} to use as a request body\nwhen calling the target operation."},"parameters":{"description":"A map representing parameters to pass to an operation\nas specified with operationId or identified via operationRef.\nThe key is the parameter name to be used, whereas the value\ncan be a constant or an expression to be evaluated and passed\nto the linked operation. The parameter name can be qualified\nusing the parameter location [{in}.]{name} for operations\nthat use the same parameter name in different locations (e.g. path.id).","type":"object","additionalProperties":true},"server":{"description":"A server object to be used by the target operation.","anyOf":[{"$ref":"#/components/schemas/Server"},{"type":"null"}]},"operationId":true,"operationRef":true},"oneOf":[{"description":"A relative or absolute reference to an OAS operation.\nThis field is mutually exclusive of the operationId field,\nand MUST point to an Operation Object. Relative operationRef\nvalues MAY be used to locate an existing Operation Object\nin the OpenAPI definition. See the rules for resolving Relative\nReferences.","type":"object","properties":{"operationRef":{"type":"string"}},"required":["operationRef"]},{"description":"The name of an existing, resolvable OAS operation,\nas defined with a unique operationId. This field is\nmutually exclusive of the operationRef field.","type":"object","properties":{"operationId":{"type":"string"}},"required":["operationId"]}],"additionalProperties":true},"ReferenceOr8":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr"}}]},"Components":{"description":"Holds a set of reusable objects for different aspects of the OAS.\nAll objects defined within the components object will have no effect\non the API unless they are explicitly referenced from properties\noutside the components object.","type":"object","properties":{"securitySchemes":{"description":"An object to hold reusable Security Scheme Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr9"}},"responses":{"description":"An object to hold reusable Response Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr6"}},"parameters":{"description":"An object to hold reusable Parameter Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr2"}},"examples":{"description":"An object to hold reusable Example Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr3"}},"requestBodies":{"description":"An object to hold reusable Request Body Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr5"}},"headers":{"description":"An object to hold reusable Header Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr4"}},"schemas":{"description":"An object to hold reusable Schema Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/SchemaObject"}},"links":{"description":"An object to hold reusable Link Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr7"}},"callbacks":{"description":"An object to hold reusable Callback Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr8"}},"pathItems":{"description":"An object to hold reusable Path Item Objects.","type":"object","additionalProperties":{"$ref":"#/components/schemas/ReferenceOr"}}},"additionalProperties":true},"ReferenceOr9":{"anyOf":[{"type":"object","properties":{"$ref":{"description":"REQUIRED. The reference identifier. This MUST be in the form of a\nURI.","type":"string"},"summary":{"description":"A short summary which by default SHOULD override that of the\nreferenced component. If the referenced object-type does not allow a\n`summary` field, then this field has no effect.","type":["string","null"]},"description":{"description":"A description which by default SHOULD override that of the\nreferenced component. CommonMark syntax MAY be used for rich text\nrepresentation. If the referenced object-type does not allow a\n`description` field, then this field has no effect.","type":["string","null"]}},"required":["$ref"]},{"$ref":"#/components/schemas/SecurityScheme"}]},"SecurityScheme":{"description":"Defines a security scheme that can be used by the operations.\nSupported schemes are HTTP authentication, an API key (either as a\nheader or as a query parameter), OAuth2's common flows (implicit, password,\napplication and access code) as defined in RFC6749, and OpenID Connect\nDiscovery.","oneOf":[{"type":"object","properties":{"in":{"$ref":"#/components/schemas/ApiKeyLocation"},"name":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string","const":"apiKey"}},"required":["type","in","name"],"additionalProperties":true},{"type":"object","properties":{"scheme":{"type":"string"},"bearerFormat":{"type":["string","null"]},"description":{"type":["string","null"]},"type":{"type":"string","const":"http"}},"required":["type","scheme"],"additionalProperties":true},{"type":"object","properties":{"flows":{"$ref":"#/components/schemas/OAuth2Flows"},"description":{"type":["string","null"]},"type":{"type":"string","const":"oauth2"}},"required":["type","flows"],"additionalProperties":true},{"type":"object","properties":{"openIdConnectUrl":{"type":"string"},"description":{"type":["string","null"]},"type":{"type":"string","const":"openIdConnect"}},"required":["type","openIdConnectUrl"],"additionalProperties":true},{"type":"object","properties":{"description":{"type":["string","null"]},"type":{"type":"string","const":"mutualTLS"}},"additionalProperties":true,"required":["type"]}]},"ApiKeyLocation":{"type":"string","enum":["query","header","cookie"]},"OAuth2Flows":{"type":"object","allOf":[{"anyOf":[{"oneOf":[{"type":"object","properties":{"implicit":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl"]}},"required":["implicit"]},{"type":"object","properties":{"password":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["password"]},{"type":"object","properties":{"clientCredentials":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["clientCredentials"]},{"type":"object","properties":{"authorizationCode":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"tokenUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl","tokenUrl"]}},"required":["authorizationCode"]}]},{}]},{"anyOf":[{"oneOf":[{"type":"object","properties":{"implicit":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl"]}},"required":["implicit"]},{"type":"object","properties":{"password":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["password"]},{"type":"object","properties":{"clientCredentials":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["clientCredentials"]},{"type":"object","properties":{"authorizationCode":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"tokenUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl","tokenUrl"]}},"required":["authorizationCode"]}]},{}]},{"anyOf":[{"oneOf":[{"type":"object","properties":{"implicit":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl"]}},"required":["implicit"]},{"type":"object","properties":{"password":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["password"]},{"type":"object","properties":{"clientCredentials":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["clientCredentials"]},{"type":"object","properties":{"authorizationCode":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"tokenUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl","tokenUrl"]}},"required":["authorizationCode"]}]},{}]},{"anyOf":[{"oneOf":[{"type":"object","properties":{"implicit":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl"]}},"required":["implicit"]},{"type":"object","properties":{"password":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["password"]},{"type":"object","properties":{"clientCredentials":{"type":"object","properties":{"refreshUrl":{"type":["string","null"]},"tokenUrl":{"type":"string"},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["tokenUrl"]}},"required":["clientCredentials"]},{"type":"object","properties":{"authorizationCode":{"type":"object","properties":{"authorizationUrl":{"type":"string"},"tokenUrl":{"type":"string"},"refreshUrl":{"type":["string","null"]},"scopes":{"type":"object","additionalProperties":{"type":"string"},"default":{}}},"required":["authorizationUrl","tokenUrl"]}},"required":["authorizationCode"]}]},{}]}]},"Tag":{"description":"Adds metadata to a single tag that is used by the\nOperation Object. It is not mandatory to have a\nTag Object per tag defined in the Operation Object instances.","type":"object","properties":{"name":{"description":"REQUIRED. The name of the tag.","type":"string"},"description":{"description":"A description for the tag.\nCommonMark syntax MAY be used for rich text representation.","type":["string","null"]},"externalDocs":{"description":"Additional external documentation for this tag.","anyOf":[{"$ref":"#/components/schemas/ExternalDocumentation"},{"type":"null"}]}},"required":["name"],"additionalProperties":true},"HealthInfo":{"description":"UNSTABLE: aggregate operational health information.","type":"object","properties":{"execution":{"$ref":"#/components/schemas/HealthExecution"},"history":{"$ref":"#/components/schemas/HealthHistory"},"replica":{"$ref":"#/components/schemas/HealthReplica"},"remote":{"default":{"stalled":false,"actionId":null,"lag":null},"allOf":[{"$ref":"#/components/schemas/HealthRemote"}]},"settlement":{"$ref":"#/components/schemas/HealthSettlement"},"oracle":{"$ref":"#/components/schemas/HealthOracle"}},"required":["execution","history","replica","settlement","oracle"]},"HealthExecution":{"type":"object","properties":{"stalled":{"type":"boolean"},"actionId":{"type":"integer","format":"uint64","minimum":0},"ageMs":{"type":"integer","format":"int128"}},"required":["stalled","actionId","ageMs"]},"HealthHistory":{"type":"object","properties":{"stalled":{"type":"boolean"},"actionId":{"type":"integer","format":"uint64","minimum":0},"lag":{"type":"integer","format":"uint64","minimum":0},"ageMs":{"type":"integer","format":"uint64","minimum":0}},"required":["stalled","actionId","lag","ageMs"]},"HealthReplica":{"type":"object","properties":{"stalled":{"type":"boolean"},"actionId":{"type":["integer","null"],"format":"uint64","minimum":0},"lag":{"type":["integer","null"],"format":"uint64","minimum":0},"delayMs":{"type":"integer","format":"int128"},"connected":{"type":"boolean"}},"required":["stalled","delayMs","connected"]},"HealthRemote":{"type":"object","properties":{"stalled":{"description":"Whether remote initialization has exceeded its startup grace period,\nor a fully journaled segment has gone unpublished for too long.","type":"boolean","default":false},"actionId":{"type":["integer","null"],"format":"uint64","minimum":0},"lag":{"type":["integer","null"],"format":"uint64","minimum":0}}},"HealthSettlement":{"type":"object","properties":{"stalled":{"type":"boolean"},"actionId":{"type":["integer","null"],"format":"uint64","minimum":0},"lag":{"type":["integer","null"],"format":"uint64","minimum":0},"delayMs":{"type":"integer","format":"int128"},"connected":{"type":"boolean"}},"required":["stalled","delayMs","connected"]},"HealthOracle":{"type":"object","properties":{"stalled":{"type":"boolean"},"delayS":{"type":"integer","format":"int64"},"timestamp":{"type":"string"}},"required":["stalled","delayS","timestamp"]},"MarketsInfo":{"type":"object","properties":{"markets":{"type":"array","items":{"$ref":"#/components/schemas/MarketInfo"}},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/TokenInfo"}}},"required":["markets","tokens"]},"MarketInfo":{"type":"object","properties":{"marketId":{"type":"integer","format":"uint32","minimum":0},"symbol":{"type":"string"},"priceDecimals":{"type":"integer","format":"uint8","minimum":0,"maximum":255},"sizeDecimals":{"type":"integer","format":"uint8","minimum":0,"maximum":255},"baseTokenId":{"$ref":"#/components/schemas/TokenId"},"quoteTokenId":{"$ref":"#/components/schemas/TokenId"},"imf":{"type":"number","format":"double"},"mmf":{"type":"number","format":"double"},"cmf":{"type":"number","format":"double"},"mode":{"$ref":"#/components/schemas/MarketMode"},"regime":{"$ref":"#/components/schemas/MarketRegime"}},"required":["marketId","symbol","priceDecimals","sizeDecimals","baseTokenId","quoteTokenId","imf","mmf","cmf","mode","regime"]},"TokenId":{"description":"31 bit token id","type":"integer","format":"uint32","minimum":0},"MarketMode":{"oneOf":[{"description":"RFQ disabled, CLOB enabled.","type":"string","const":"clob"},{"description":"CLOB disabled, RFQ enabled.","type":"string","const":"rfq"}]},"MarketRegime":{"oneOf":[{"type":"string","enum":["normal"]},{"description":"RFQ placement is disabled, and only PostOnly CLOB orders can be placed.\nRFQ market makers can still take orders already moved to CLOB.","type":"string","const":"postOnly"},{"description":"Cannot place resting orders; only immediate orders may trade existing liquidity.","type":"string","const":"tradeOnly"}]},"TokenInfo":{"type":"object","properties":{"tokenId":{"$ref":"#/components/schemas/TokenId"},"symbol":{"type":"string"},"decimals":{"type":"integer","format":"uint8","minimum":0,"maximum":255},"mintAddr":{"type":"string"},"weightBps":{"type":"integer","format":"uint16","minimum":0,"maximum":65535}},"required":["tokenId","symbol","decimals","mintAddr","weightBps"]},"MarketsLiveInfo":{"type":"object","properties":{"markets":{"type":"array","items":{"$ref":"#/components/schemas/MarketLiveInfo"}}},"required":["markets"]},"MarketLiveInfo":{"type":"object","properties":{"marketId":{"type":"integer","format":"uint32","minimum":0},"frozen":{"description":"Admin can freeze market.\nCan happen when there are issues with market setup and need to stop operations.\nOr if market permanently delisted (orderbook l2 is zero and perpetuals open interest would be zero in this case).","type":"boolean"},"indexPrice":{"type":["number","null"],"format":"double"},"indexPriceConf":{"type":["number","null"],"format":"double"},"rfq":{"description":"Latest finalized RFQ sampling that contained at least one quote, if available.","anyOf":[{"$ref":"#/components/schemas/MarketLiveRfqInfo"},{"type":"null"}]},"clob":{"description":"Current CLOB top of book. Optional until every market has a CLOB.","anyOf":[{"$ref":"#/components/schemas/MarketLiveClobInfo"},{"type":"null"}]},"perpetuals":{"anyOf":[{"$ref":"#/components/schemas/MarketLivePerpInfo"},{"type":"null"}]},"historical":{"description":"Historical data loaded from the internal database. This may be null if an internal error prevents\nthe data from being loaded. Clients must handle null gracefully.","anyOf":[{"$ref":"#/components/schemas/MarketLiveHistoricalInfo"},{"type":"null"}]}},"required":["marketId"]},"MarketLiveRfqInfo":{"type":"object","properties":{"actionId":{"type":"integer","format":"uint64","minimum":0},"physicalTime":{"type":"string"},"sampledBidPrice":{"type":["number","null"],"format":"double"},"sampledAskPrice":{"type":["number","null"],"format":"double"},"indexPriceAtSampleTime":{"type":["number","null"],"format":"double"}},"required":["actionId","physicalTime"]},"MarketLiveClobInfo":{"type":"object","properties":{"actionId":{"type":"integer","format":"uint64","minimum":0},"physicalTime":{"type":"string"},"bestBidPrice":{"type":["number","null"],"format":"double"},"bestAskPrice":{"type":["number","null"],"format":"double"}},"required":["actionId","physicalTime"]},"MarketLivePerpInfo":{"type":"object","properties":{"markPrice":{"description":"Mark price of the perpetual. Null only for a new market.","type":["number","null"],"format":"double"},"projectedFundingRate":{"description":"The projected funding rate for the next funding time. Becomes null right\nafter funding is paid, as there is not yet any data to project the next\nfunding rate.","type":["number","null"],"format":"double"},"nextFundingTime":{"description":"The next time at which funding will be paid. Locked to the hour, though\nmay be delayed if oracle updates are delayed.","type":"string"},"openInterest":{"description":"Current open interest for this market.","type":"number","format":"double"}},"required":["nextFundingTime","openInterest"]},"MarketLiveHistoricalInfo":{"type":"object","properties":{"open24h":{"description":"Price of the first trade in the last 24 hours.","type":["number","null"],"format":"double"},"low24h":{"description":"Lowest trade price in the last 24 hours.","type":["number","null"],"format":"double"},"high24h":{"description":"Highest trade price in the last 24 hours.","type":["number","null"],"format":"double"},"close24h":{"description":"Price of the last trade in the last 24 hours.","type":["number","null"],"format":"double"},"volumeBase24h":{"description":"Base volume traded in the last 24 hours.","type":"number","format":"double"},"volumeQuote24h":{"description":"Quote volume traded in the last 24 hours.","type":"number","format":"double"},"perpetuals":{"anyOf":[{"$ref":"#/components/schemas/MarketLiveHistoricalPerpInfo"},{"type":"null"}]}},"required":["volumeBase24h","volumeQuote24h"]},"MarketLiveHistoricalPerpInfo":{"type":"object","properties":{"lastSettledFundingRate":{"description":"Last settled funding rate. On fresh markets, this starts at 0.","type":"number","format":"double"}},"required":["lastSettledFundingRate"]},"MarketNotFound":{"type":"object","properties":{"market_id":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["market_id"]},"AcceptedMediaType":{"type":"object","properties":{"expected":{"type":"string"}},"required":["expected"]},"PayloadTooLarge":{"type":"object","properties":{"limit":{"type":"integer","format":"uint","minimum":0}},"required":["limit"]},"ActionsQuery":{"type":"object","properties":{"from":{"description":"Start action ID (inclusive)","type":"integer","format":"uint64","minimum":0},"to":{"description":"End action ID (inclusive)","type":"integer","format":"uint64","minimum":0},"clientVersion":{"description":"Optionally provided binary version of client, so nord server can ensure all actions provided are executable by client.","anyOf":[{"$ref":"#/components/schemas/ExecutableVersion"},{"type":"null"}]}},"required":["from","to"]},"ExecutableVersion":{"type":"string"},"ActionsItem":{"type":"object","properties":{"actionId":{"type":"integer","format":"uint64","minimum":0},"physicalTime":{"type":"string"},"payload":{"description":"Payload which is enough to replay original action.","type":"string"}},"required":["actionId","physicalTime","payload"]},"RangeTooLarge":{"type":"object","properties":{"requested":{"type":"integer","format":"uint64","minimum":0},"maximal":{"type":"integer","format":"uint16","minimum":0,"maximum":65535}},"required":["requested","maximal"]},"NotImplemented":{"type":"object","properties":{"message":{"description":"Human readable message describing what to expect next.","type":"string"}},"required":["message"]},"ActionNotFound":{"type":"null"},"Timestamp":{"type":"string","minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":16},"FillRole":{"description":"Returns fee parts per market per balance change per action per account.\nFee is taken from user without return.\nPlease note that some operations need some deposit which will be returned - these are not part of fees.","oneOf":[{"description":"For maker. Payed when taken. Does NOT includes placement fee. Taken from increased account balance after trade.","type":"string","const":"maker"},{"description":"For taker. Taken from increased account balance after trade.","type":"string","const":"taker"}]},"AccountId":{"description":"31 bit account id","type":"integer","format":"uint32","minimum":0},"UserNotFound":{"type":"null"},"OrderbookL2Info":{"type":"object","properties":{"updateId":{"type":"integer","format":"uint64","minimum":0},"asks":{"type":"array","items":{"type":"array","maxItems":2,"minItems":2,"items":[{"type":"number","format":"double"},{"type":"number","format":"double"}]}},"bids":{"type":"array","items":{"type":"array","maxItems":2,"minItems":2,"items":[{"type":"number","format":"double"},{"type":"number","format":"double"}]}},"asksSummary":{"$ref":"#/components/schemas/SideSummary"},"bidsSummary":{"$ref":"#/components/schemas/SideSummary"}},"required":["updateId","asks","bids","asksSummary","bidsSummary"]},"SideSummary":{"type":"object","properties":{"sum":{"type":"number","format":"double"},"count":{"type":"integer","format":"uint32","minimum":0}},"required":["sum","count"]},"MarketStats":{"type":"object","properties":{"indexPrice":{"type":["number","null"],"format":"double"},"indexPriceConf":{"type":["number","null"],"format":"double"},"frozen":{"type":"boolean"},"volumeBase24h":{"type":"number","format":"double"},"volumeQuote24h":{"type":"number","format":"double"},"high24h":{"type":["number","null"],"format":"double"},"low24h":{"type":["number","null"],"format":"double"},"close24h":{"type":["number","null"],"format":"double"},"prevClose24h":{"type":["number","null"],"format":"double"},"perpStats":{"anyOf":[{"$ref":"#/components/schemas/PerpMarketStats"},{"type":"null"}]}},"required":["volumeBase24h","volumeQuote24h"]},"PerpMarketStats":{"type":"object","properties":{"mark_price":{"type":["number","null"],"format":"double"},"aggregated_funding_index":{"type":"number","format":"double"},"funding_rate":{"type":"number","format":"double"},"next_funding_time":{"type":"string"},"open_interest":{"description":"Current open interest for this market.","type":"number","format":"double"}},"required":["aggregated_funding_index","funding_rate","next_funding_time","open_interest"]},"TokenStats":{"type":"object","properties":{"symbol":{"type":"string"},"decimals":{"type":"integer","format":"uint8","minimum":0,"maximum":255},"mintAddr":{"type":"string"},"weightBps":{"type":"integer","format":"uint16","minimum":0,"maximum":65535},"oracleSymbol":{"type":"string"},"indexPrice":{"description":"Index price for the token","anyOf":[{"$ref":"#/components/schemas/TokenPrice"},{"type":"null"}]}},"required":["symbol","decimals","mintAddr","weightBps","oracleSymbol"]},"TokenPrice":{"type":"object","properties":{"median":{"type":"number","format":"double"},"confidence":{"type":"number","format":"double"}},"required":["median","confidence"]},"TokenNotFound":{"type":"null"},"RegistrationKey":{"description":"Solana base58 address with private key (must have private side so that can create session after).\nBasically fix for solana-pubkey is array of bytes in serde https://github.com/anza-xyz/solana-sdk/pull/76","type":"string"},"User":{"type":"object","properties":{"accountIds":{"type":"array","items":{"$ref":"#/components/schemas/AccountId"}},"sessions":{"type":"object","additionalProperties":false,"patternProperties":{"^\\d+$":{"$ref":"#/components/schemas/UserSession"}}}},"required":["accountIds","sessions"]},"UserSession":{"type":"object","properties":{"pubkey":{"$ref":"#/components/schemas/RegistrationKey"},"expiry":{"type":"string"},"refreshDeadline":{"type":["string","null"]}},"required":["pubkey","expiry"]},"PageQueryPart":{"type":"object","properties":{"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":["integer","null"],"format":"uint64","minimum":0},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null}}},"PageResult_for_uint64_and_OrderInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/OrderInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"OrderInfo":{"description":"Order summary.\nUse order_id to application side join with trades as needed.","type":"object","properties":{"addedAt":{"type":"string"},"updatedAt":{"type":"string"},"tradeId":{"type":"integer","format":"uint64","minimum":0},"traderId":{"$ref":"#/components/schemas/AccountId"},"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"marketMode":{"$ref":"#/components/schemas/MarketMode"},"orderId":{"type":"integer","format":"uint64","minimum":0},"side":{"$ref":"#/components/schemas/Side"},"placedSize":{"type":"number","format":"double"},"filledSize":{"type":["number","null"],"format":"double"},"updateActionId":{"type":"integer","format":"uint64","minimum":0},"isReduceOnly":{"type":"boolean"},"fillMode":{"$ref":"#/components/schemas/FillMode"},"placedPrice":{"type":"number","format":"double"},"originalSizeLimit":{"type":["number","null"],"format":"double"},"originalPriceLimit":{"type":["number","null"],"format":"double"},"clientOrderId":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"placementRole":{"$ref":"#/components/schemas/PlacementRole"},"finalizationReason":{"anyOf":[{"$ref":"#/components/schemas/FinalizationReason"},{"type":"null"}]},"marketSymbol":{"type":"string"},"tokenSymbol":{"type":"string"}},"required":["addedAt","updatedAt","tradeId","traderId","marketId","marketMode","orderId","side","placedSize","updateActionId","isReduceOnly","fillMode","placedPrice","placementRole","marketSymbol","tokenSymbol"]},"Side":{"oneOf":[{"description":"Minimum price seller willing to accept. \"Short\". -","type":"string","const":"ask"},{"description":"Maximum price buyer willing to pay. \"Long\". +","type":"string","const":"bid"}]},"FillMode":{"oneOf":[{"description":"Normal order, filled if there are opposite orders with prices equal or better than limit.\nLimit - requires price and one of sizes","type":"string","const":"Limit"},{"description":"Only place the order if it wouldn't get filled by any other, i.e. don't fill only post. This\nmay be considered to be the opposite of `ImmediateOrCancel`.\nPost-only - requires price and one of sizes, plus its price not matching opposite orders","type":"string","const":"PostOnly"},{"description":"Order is either filled at least partially or cancelled (IoC).","type":"string","const":"ImmediateOrCancel"},{"description":"Order is either filled completely right away or cancelled (FoK).  \nSimilar to an IoC order but which must fill completely.","type":"string","const":"FillOrKill"}]},"PlacementRole":{"type":"string","enum":["AccountOwner","VaultManager","SuperAdmin","Trigger","Liquidator"]},"FinalizationReason":{"description":"Once an order update is stored in history with one of these reasons, the\norder is final and no further updates may be added.","type":"string","enum":["Filled","Canceled","Taken","TimedOut","Rejected"]},"Account":{"type":"object","properties":{"updateId":{"type":"integer","format":"uint64","minimum":0},"orders":{"type":"array","items":{"$ref":"#/components/schemas/OpenOrder"}},"positions":{"type":"array","items":{"$ref":"#/components/schemas/PositionSummary"}},"balances":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}},"margins":{"$ref":"#/components/schemas/AccountMarginsView"}},"required":["updateId","orders","positions","balances","margins"]},"OpenOrder":{"type":"object","properties":{"orderId":{"type":"integer","format":"uint64","minimum":0},"marketId":{"type":"integer","format":"uint32","minimum":0},"side":{"$ref":"#/components/schemas/Side"},"size":{"type":"number","format":"double"},"price":{"type":"number","format":"double"},"originalOrderSize":{"type":"number","format":"double"},"clientOrderId":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19}},"required":["orderId","marketId","side","size","price","originalOrderSize"]},"PositionSummary":{"description":"Summary of position.\nDoes not provide details information about specific orders.","type":"object","properties":{"marketId":{"type":"integer","format":"uint32","minimum":0},"openOrders":{"type":"integer","format":"uint16","minimum":0,"maximum":65535},"perp":{"anyOf":[{"$ref":"#/components/schemas/PerpPositionUpdate"},{"type":"null"}]},"actionId":{"type":"integer","format":"uint64","minimum":0}},"required":["marketId","openOrders","actionId"]},"PerpPositionUpdate":{"type":"object","properties":{"baseSize":{"type":"number","format":"double"},"price":{"type":"number","format":"double"},"updatedFundingRateIndex":{"type":"number","format":"double"},"fundingPaymentPnl":{"description":"In stable coin, USDC","type":"number","format":"double"},"tradingPnl":{"description":"In stable coin, USDC","type":"number","format":"double"},"sizePricePnl":{"description":"DEPRECATED, use `trading_pnl`","type":"number","format":"double"},"isLong":{"type":"boolean"}},"required":["baseSize","price","updatedFundingRateIndex","fundingPaymentPnl","tradingPnl","sizePricePnl","isLong"]},"Balance":{"type":"object","properties":{"tokenId":{"$ref":"#/components/schemas/TokenId"},"token":{"type":"string"},"amount":{"type":"number","format":"double"}},"required":["tokenId","token","amount"]},"AccountMarginsView":{"description":"Represents account health state.\nEach field expressed in USD basis points per account.\nFor example:\n- value of 1.0000 means 1 USD.\n- value of 123.0004 means 123 USD and 0.04 cent.\n\nAll values are actual only at specific moment in time - because both market and oracle prices fluctuate all the time","type":"object","properties":{"omf":{"description":"Somewhat proportional to USD weighted value of account, its tokens and positive PnL;\nsub negative PnL, debt.\n\nSee MARKETS.md for details.\nSpecifically have MF as basis points, divide by `pn`","type":"number","format":"double"},"mf":{"description":"Similar to OMF.\nSee distinguishing in MARKETS.md.\n\nSpecifically have MF as basis points, divide by `pon`.","type":"number","format":"double"},"imf":{"description":"Compare with OMF.\nDivide by PON to get basis points value.\nTells when account may or may not open orders.","type":"number","format":"double"},"cmf":{"description":"Compare with OMF.\nDivide by PON to get basis points value.\nTells when account's orders to be cancelled.","type":"number","format":"double"},"mmf":{"description":"Compare with MF.\nDivide by PON to get basis points value.\nTells when account positions reduced and assets sold.","type":"number","format":"double"},"pon":{"description":"Expressed in USD, can be zero.\nSee PON in MARKETS.md for details.\nSomewhat proportional to open position size and orders size in OB.","type":"number","format":"double"},"pn":{"description":"Similar to `pon`. See PN in MARKETS.md.","type":"number","format":"double"},"bankruptcy":{"description":"See `bankruptcy` in MARKETS.md.\nIn general happens if account does not have enough weighted tokens to\ncovert his debt and negative PnL.","type":"boolean"}},"required":["omf","mf","imf","cmf","mmf","pon","pn","bankruptcy"]},"VaultViewState":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/VaultState"},"status":{"$ref":"#/components/schemas/VaultStatus"}},"required":["state","status"]},"VaultState":{"description":"Wrapper around one normal engine account.\n\nThe account keeps balances, positions, orders, triggers, funding,\nliquidation, and account health. This state adds manager, config, shares,\nepochs, and owner accounting.","type":"object","properties":{"vault_id":{"$ref":"#/components/schemas/VaultId"},"account_id":{"$ref":"#/components/schemas/AccountId"},"manager_pubkey":{"$ref":"#/components/schemas/RegistrationKey"},"config":{"$ref":"#/components/schemas/VaultConfig"},"live_share_supply":{"type":"integer","format":"uint128","minimum":0},"epochs":{"$ref":"#/components/schemas/VaultEpochs"},"users":{"type":"object","additionalProperties":false,"patternProperties":{"^\\d+$":{"$ref":"#/components/schemas/VaultUserState"}}}},"required":["vault_id","account_id","manager_pubkey","config","live_share_supply","epochs","users"]},"VaultId":{"description":"VaultId is a 31 bit id for vault state and vault DTOs.","type":"integer","format":"uint32","minimum":0},"VaultConfig":{"description":"Policy set by `CreateVault` and `UpdateVaultConfig`.","type":"object","properties":{"deposit_cap":{"description":"Maximum allowed post deposit `AV`.","allOf":[{"$ref":"#/components/schemas/PositiveQuoteSize"}]},"open_position_discount_bps":{"description":"Discount used in `H_open` for withdrawal request pricing.","type":"integer","format":"uint16","minimum":0,"maximum":65535},"drawdown":{"description":"Drawdown thresholds used by vault health.","allOf":[{"$ref":"#/components/schemas/DrawdownConfig"}]},"epoch_min_duration":{"description":"Minimum time before `VaultSyncEpochs` can close the current epoch.","allOf":[{"$ref":"#/components/schemas/Duration"}]}},"required":["deposit_cap","open_position_discount_bps","drawdown","epoch_min_duration"]},"PositiveQuoteSize":{"description":"Quote size limit for orders, stored as aggregated amount.\nUnlike NonZeroQuoteSize, this doesn't decompose into (base_size, price).\nUsed exclusively for OrderLimits to represent maximum execution amount.\n\nThe value is the aggregated quote amount (base_size * price) in the market's\ncombined decimals (price_decimals + size_decimals).","type":"integer","format":"uint128","minimum":1},"DrawdownConfig":{"description":"Drawdown measures how far current price per share is below a stored epoch\nprice per share reference.","type":"object","properties":{"protection_bps":{"description":"Threshold that requires `DeriskOnly`.","type":"integer","format":"uint16","minimum":0,"maximum":65535},"freeze_bps":{"description":"Threshold that requires `Frozen`.","type":"integer","format":"uint16","minimum":0,"maximum":65535}},"required":["protection_bps","freeze_bps"]},"Duration":{"type":"integer","minimum":1,"maximum":2147483647},"VaultEpochs":{"description":"Aggregate withdrawal bucket and epoch state\n\nWithdrawals are aggregate `Q_current`, `Q_previous`, and `Q_claimable`","type":"object","properties":{"current_epoch_id":{"$ref":"#/components/schemas/EpochId"},"current_epoch_started_at":{"$ref":"#/components/schemas/Timestamp"},"paid_through_epoch_id":{"anyOf":[{"$ref":"#/components/schemas/EpochId"},{"type":"null"}]},"withdrawals":{"$ref":"#/components/schemas/WithdrawalBuckets"},"latest_epoch_pps_ref":{"anyOf":[{"$ref":"#/components/schemas/VaultPpsRef"},{"type":"null"}]},"prior_epoch_pps_ref":{"anyOf":[{"$ref":"#/components/schemas/VaultPpsRef"},{"type":"null"}]}},"required":["current_epoch_id","current_epoch_started_at","withdrawals"]},"EpochId":{"description":"EpochId is a 31 bit id for vault withdrawal epochs.","type":"integer","format":"uint32","minimum":0},"WithdrawalBuckets":{"description":"Withdrawal buckets (accounting state)\n\nBuckets store `Q_current`, `Q_previous`, and `Q_claimable`","type":"object","properties":{"current_epoch":{"type":"integer","format":"uint64","minimum":0},"previous_epoch":{"type":"integer","format":"uint64","minimum":0},"claimable":{"type":"integer","format":"uint64","minimum":0}},"required":["current_epoch","previous_epoch","claimable"]},"VaultPpsRef":{"description":"Price per share reference stored when an epoch closes.\n\nIt stores `AV_safe,ref` and `S_ref`.\n\n`PPS_ref = AV_safe,ref / S_ref`","type":"object","properties":{"epoch_id":{"$ref":"#/components/schemas/EpochId"},"safe_account_value":{"description":"This is `AV_safe,ref`. `None` means safe value is negative under engine\naccount value semantics.","type":["integer","null"],"format":"uint128","minimum":0},"share_supply":{"type":"integer","format":"uint128","minimum":1}},"required":["epoch_id","share_supply"]},"VaultUserState":{"description":"Owner share and withdrawal state\n\nWithdrawals are owner side `Q_owner,current`, `Q_owner,previous`, and\n`Q_owner,claimable`","type":"object","properties":{"shares":{"type":"integer","format":"uint128","minimum":0},"withdrawals":{"$ref":"#/components/schemas/WithdrawalBuckets"},"current_epoch_id":{"$ref":"#/components/schemas/EpochId"},"previous_epoch_id":{"$ref":"#/components/schemas/EpochId"}},"required":["shares","withdrawals","current_epoch_id","previous_epoch_id"]},"VaultStatus":{"description":"Restriction level used to allow, reject, or limit vault actions.","oneOf":[{"description":"Allows deposits, withdrawal requests, claims, and manager actions.","type":"string","const":"Active"},{"description":"Rejects deposits and limits manager actions to derisk actions.","type":"string","const":"DeriskOnly"},{"description":"Rejects deposits, withdrawal requests, and manager actions. Claims stay allowed.","type":"string","const":"Frozen"}]},"VaultNotFound":{"type":"object","properties":{"vault_id":{"$ref":"#/components/schemas/VaultId"}},"required":["vault_id"]},"AccountVaultUserStateInfo":{"type":"object","properties":{"vaultId":{"$ref":"#/components/schemas/VaultId"},"vaultAccountId":{"$ref":"#/components/schemas/AccountId"},"status":{"$ref":"#/components/schemas/VaultStatus"},"user":{"$ref":"#/components/schemas/VaultUserState"}},"required":["vaultId","vaultAccountId","status","user"]},"GetAccountPnlHistoryQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","anyOf":[{"$ref":"#/components/schemas/ActionIdSubActionIdMarketIdCursor"},{"type":"null"}]},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null},"marketId":{"description":"Optional market filter by market id.","type":["integer","null"],"minimum":0,"maximum":2147483647,"default":null}}},"ActionIdSubActionIdMarketIdCursor":{"type":"string"},"PageResult_for_ActionIdSubActionIdMarketIdCursor_and_AccountPnlInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/AccountPnlInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","anyOf":[{"$ref":"#/components/schemas/ActionIdSubActionIdMarketIdCursor"},{"type":"null"}]}},"required":["items"]},"AccountPnlInfo":{"type":"object","properties":{"time":{"description":"Time of the position update.","type":"string"},"actionId":{"description":"Action id of the update. Used for pagination.","type":"integer","format":"uint64","minimum":0},"subActionId":{"description":"Sub-action id of the update. Used with action id for pagination.","allOf":[{"$ref":"#/components/schemas/SubActionId"}]},"marketId":{"description":"Market id of the position update.","type":"integer","minimum":0,"maximum":2147483647},"tradingPnl":{"description":"PnL realized from this position update.","type":"number","format":"double"},"settledFundingPnl":{"description":"Amount of unsettled funding paid to the account. Accumulated funding\npayments are tracked but only paid out to the account when updates\nhappen. Thus, PnL history might include entries with no trading pnl\n(for example when opening or extending a position), but will still\ninclude funding payments if needed.","type":"number","format":"double"},"positionSize":{"description":"Position size at the time of the pnl update. Positive for longs, negative for shorts.","type":"number","format":"double"},"entryPrice":{"description":"Weighted average entry price of the position after this update.\nNull if position was closed.","type":["number","null"],"format":"double"}},"required":["time","actionId","subActionId","marketId","tradingPnl","settledFundingPnl","positionSize"]},"SubActionId":{"description":"Sub-action index within an action (0-based).\n\nStored as `u8`; maps to Postgres `INT2` (`U15` domain).\nNon-atomic actions use 0; atomic actions use 0..N for each sub-action.","type":"integer","format":"uint8","minimum":0,"maximum":255},"GetAccountPositionHistoryQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","anyOf":[{"$ref":"#/components/schemas/ActionIdSubActionIdMarketIdCursor"},{"type":"null"}]},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null},"marketId":{"description":"Optional market filter by market id.","type":["integer","null"],"minimum":0,"maximum":2147483647,"default":null}}},"PageResult_for_ActionIdSubActionIdMarketIdCursor_and_AccountPositionHistoryInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/AccountPositionHistoryInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","anyOf":[{"$ref":"#/components/schemas/ActionIdSubActionIdMarketIdCursor"},{"type":"null"}]}},"required":["items"]},"AccountPositionHistoryInfo":{"type":"object","properties":{"time":{"description":"Time of the position update.","type":"string"},"actionId":{"description":"Action id of the update. Used for pagination.","type":"integer","format":"uint64","minimum":0},"subActionId":{"description":"Sub-action id of the update. Used with action id for pagination.","allOf":[{"$ref":"#/components/schemas/SubActionId"}]},"marketId":{"description":"Market id of the position update.","type":"integer","minimum":0,"maximum":2147483647},"tradingPnl":{"description":"PnL realized from this position update.","type":"number","format":"double"},"fundingPnlDelta":{"description":"Funding balance delta for this position update.","type":"number","format":"double"},"positionSize":{"description":"Position size at the time of the update. Positive for longs, negative for shorts.","type":"number","format":"double"},"entryPrice":{"description":"Weighted average entry price of the position after this update.\nNull if position was closed.","type":["number","null"],"format":"double"}},"required":["time","actionId","subActionId","marketId","tradingPnl","fundingPnlDelta","positionSize"]},"BadRequest":{"type":"null"},"GetAccountPnlQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"marketId":{"description":"Optional market filter by market id.","type":["integer","null"],"minimum":0,"maximum":2147483647,"default":null}}},"AccountPnlSummaryResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountPnlSummaryInfo"}},"lastUpdatedAtTimestamp":{"type":"string"},"lastUpdatedAtActionId":{"type":"integer","format":"uint64","minimum":0}},"required":["items","lastUpdatedAtTimestamp","lastUpdatedAtActionId"]},"AccountPnlSummaryInfo":{"type":"object","properties":{"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"tradingPnl":{"type":"number","format":"double"},"settledFundingPnl":{"type":"number","format":"double"}},"required":["marketId","tradingPnl","settledFundingPnl"]},"GetAccountPositionSummaryQuery":{"type":"object","properties":{"marketId":{"description":"Optional market filter by market id.","type":["integer","null"],"minimum":0,"maximum":2147483647,"default":null}}},"AccountPositionSummaryResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountPositionSummaryInfo"}},"lastUpdatedAtTimestamp":{"description":"latest timestamp processed by the cumulative pnl materializer.","type":"string"},"lastUpdatedAtActionId":{"description":"latest action processed by the cumulative pnl materializer.","type":"integer","format":"uint64","minimum":0}},"required":["items","lastUpdatedAtTimestamp","lastUpdatedAtActionId"]},"AccountPositionSummaryInfo":{"type":"object","properties":{"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"tradingPnl":{"description":"all-time realized trading pnl. this does not include funding.","type":"number","format":"double"},"fundingPnl":{"$ref":"#/components/schemas/AccountPositionFundingPnl"}},"required":["marketId","tradingPnl","fundingPnl"]},"AccountPositionFundingPnl":{"type":"object","properties":{"sinceChange":{"description":"unsettled funding since the last position size change at the returned progress.\nomitted when no position is open in the market.","type":["number","null"],"format":"double"},"sinceOpen":{"description":"funding for the current open or flipped lifecycle at the returned progress.\nomitted when no position is open in the market.","type":["number","null"],"format":"double"},"allTime":{"description":"funding for the full account and market history at the returned progress.\nomitted when the account has no position history in the market.","type":["number","null"],"format":"double"}}},"GetAccountFundingHistoryQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":["string","null"]},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null},"marketId":{"description":"Optional market filter by market id.","type":["integer","null"],"minimum":0,"maximum":2147483647,"default":null}}},"PageResult_for_string_and_AccountFundingInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/AccountFundingInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["string","null"]}},"required":["items"]},"AccountFundingInfo":{"type":"object","properties":{"time":{"description":"Time of the position update.","type":"string"},"actionId":{"description":"Action id of the update. Used for pagination.","type":"integer","format":"uint64","minimum":0},"marketId":{"description":"Market id of the position update.","type":"integer","minimum":0,"maximum":2147483647},"positionSize":{"description":"Position size at the time of the pnl update. Positive for longs, negative for shorts.","type":"number","format":"double"},"fundingPnl":{"description":"Funding paid to the account for this funding period.","type":"number","format":"double"}},"required":["time","actionId","marketId","positionSize","fundingPnl"]},"GetAccountFeeTierHistoryQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":["integer","null"],"format":"uint64","minimum":0},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null}}},"PageResult_for_uint64_and_AccountFeeTierHistory":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/AccountFeeTierHistory"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"AccountFeeTierHistory":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"accountId":{"$ref":"#/components/schemas/AccountId"},"feeTier":{"$ref":"#/components/schemas/FeeTierId"},"makerFeePpm":{"type":"integer","format":"uint32","minimum":0},"takerFeePpm":{"type":"integer","format":"uint32","minimum":0}},"required":["time","actionId","accountId","feeTier","makerFeePpm","takerFeePpm"]},"FeeTierId":{"type":"integer","format":"uint32","minimum":0},"GetAccountTriggerPlaceHistoryQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","anyOf":[{"$ref":"#/components/schemas/TriggerHistCursor"},{"type":"null"}]},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null}}},"TriggerHistCursor":{"type":"string"},"PageResult_for_TriggerHistCursor_and_PlaceTriggerRow":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/PlaceTriggerRow"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","anyOf":[{"$ref":"#/components/schemas/TriggerHistCursor"},{"type":"null"}]}},"required":["items"]},"PlaceTriggerRow":{"type":"object","properties":{"time":{"type":"string"},"triggerId":{"type":"string","minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"accountId":{"$ref":"#/components/schemas/AccountId"},"actionId":{"type":"integer","format":"uint64","minimum":0},"subActionId":{"$ref":"#/components/schemas/SubActionId"},"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"marketMode":{"$ref":"#/components/schemas/MarketMode"},"triggerPrice":{"$ref":"#/components/schemas/PositivePriceMantissa"},"limitPrice":{"anyOf":[{"$ref":"#/components/schemas/PositivePriceMantissa"},{"type":"null"}]},"limitBaseSize":{"anyOf":[{"$ref":"#/components/schemas/PositiveSize"},{"type":"null"}]},"limitQuoteSize":{"anyOf":[{"$ref":"#/components/schemas/PositiveQuoteSize"},{"type":"null"}]},"side":{"$ref":"#/components/schemas/Side"},"kind":{"$ref":"#/components/schemas/Kind"},"orderId":{"type":["integer","null"],"format":"uint64","minimum":0}},"required":["time","triggerId","accountId","actionId","subActionId","marketId","marketMode","triggerPrice","side","kind"]},"PositivePriceMantissa":{"description":"63 bit integer, which is always positive","type":"integer","format":"uint64","minimum":1},"PositiveSize":{"description":"63 bit non zero balanced number representing size.\nIt may be short or long, needs extra info to be used.","type":"integer","format":"uint64","minimum":1},"Kind":{"type":"string","enum":["stopLoss","takeProfit"]},"GetAccountTriggerFinaliseHistoryQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null}}},"PageResult_for_TriggerId_and_FinaliseTriggerRow":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/FinaliseTriggerRow"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19}},"required":["items"]},"FinaliseTriggerRow":{"type":"object","properties":{"time":{"type":"string"},"triggerId":{"type":"string","minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"accountId":{"$ref":"#/components/schemas/AccountId"},"actionId":{"type":"integer","format":"uint64","minimum":0},"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"marketMode":{"$ref":"#/components/schemas/MarketMode"},"triggerPrice":{"$ref":"#/components/schemas/PositivePriceMantissa"},"limitPrice":{"anyOf":[{"$ref":"#/components/schemas/PositivePriceMantissa"},{"type":"null"}]},"limitBaseSize":{"anyOf":[{"$ref":"#/components/schemas/PositiveSize"},{"type":"null"}]},"limitQuoteSize":{"anyOf":[{"$ref":"#/components/schemas/PositiveQuoteSize"},{"type":"null"}]},"side":{"$ref":"#/components/schemas/Side"},"kind":{"$ref":"#/components/schemas/Kind"},"orderId":{"type":["integer","null"],"format":"uint64","minimum":0},"status":{"$ref":"#/components/schemas/Status"},"error":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"type":"null"}]},"executorId":{"anyOf":[{"$ref":"#/components/schemas/AccountId"},{"type":"null"}]}},"required":["time","triggerId","accountId","actionId","marketId","marketMode","triggerPrice","side","kind","status"]},"Status":{"type":"string","enum":["Active","Success","Removed","Cancelled","Failed"]},"Error":{"type":"string","enum":["noPosition","planningFailed","bankruptcy","riskCheckFailed","reduceOnlyCheckFailed"]},"FullTriggerOrder":{"type":"object","properties":{"triggerId":{"type":"string","minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"accountId":{"$ref":"#/components/schemas/AccountId"},"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"marketMode":{"$ref":"#/components/schemas/MarketMode"},"trigger":{"$ref":"#/components/schemas/TriggerParams"},"sibling":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"orderId":{"type":["integer","null"],"format":"uint64","minimum":0}},"required":["triggerId","accountId","marketId","marketMode","trigger"]},"TriggerParams":{"type":"object","properties":{"side":{"description":"Side of the order placed when the trigger fires.","allOf":[{"$ref":"#/components/schemas/Side"}]},"kind":{"$ref":"#/components/schemas/Kind"},"trigger_price":{"$ref":"#/components/schemas/PositivePriceMantissa"},"limits":{"anyOf":[{"$ref":"#/components/schemas/OrderLimits"},{"type":"null"}]}},"required":["side","kind","trigger_price"]},"OrderLimits":{"description":"At least one limit to be presented.\nLogically limit is min value obtained executing.\n`final_limit = min(base_size, quote_size, price)`","type":"object","properties":{"price":{"description":"must be same decimals as `Price` if not `None` at current state","type":["integer","null"],"format":"uint64","minimum":1},"base_size":{"type":["integer","null"],"format":"uint64","minimum":1},"quote_size":{"anyOf":[{"$ref":"#/components/schemas/PositiveQuoteSize"},{"type":"null"}]}}},"OrderNotFound":{"type":"null"},"PageResult_for_uint64_and_Trade":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/Trade"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"Trade":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"tradeId":{"type":"integer","format":"uint64","minimum":0},"takerId":{"$ref":"#/components/schemas/AccountId"},"takerSide":{"$ref":"#/components/schemas/Side"},"makerId":{"$ref":"#/components/schemas/AccountId"},"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"marketMode":{"$ref":"#/components/schemas/MarketMode"},"orderId":{"type":"integer","format":"uint64","minimum":0},"price":{"type":"number","format":"double"},"baseSize":{"type":"number","format":"double"},"takerFee":{"description":"Null for historical trades recorded before fee capture was added.\nFor spot, this is base-denominated when `taker_side` is `bid`,\nand quote-denominated when `taker_side` is `ask`.","type":["number","null"],"format":"double"},"makerFee":{"description":"Null for historical trades recorded before fee capture was added.\nFor spot, this is quote-denominated when `taker_side` is `bid`,\nand base-denominated when `taker_side` is `ask`.","type":["number","null"],"format":"double"}},"required":["time","actionId","tradeId","takerId","takerSide","makerId","marketId","marketMode","orderId","price","baseSize"]},"TradesQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":["integer","null"],"format":"uint64","minimum":0},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null},"paginationMode":{"default":"tradeId","allOf":[{"$ref":"#/components/schemas/TradesPaginationMode"}]},"takerId":{"anyOf":[{"$ref":"#/components/schemas/AccountId"},{"type":"null"}],"default":null},"takerSide":{"anyOf":[{"$ref":"#/components/schemas/Side"},{"type":"null"}],"default":null},"makerId":{"anyOf":[{"$ref":"#/components/schemas/AccountId"},{"type":"null"}],"default":null},"marketId":{"type":["integer","null"],"format":"uint32","minimum":0,"default":null}}},"TradesPaginationMode":{"type":"string","enum":["tradeId","actionId"]},"DownloadFilter":{"anyOf":[{"$ref":"#/components/schemas/Op"},{"description":"If there is no exact action id snapped, nearest download.\nSo request does not forces remote nord to execute up to new snap.\nIt is upt to caller get actions and replay as needed.\nIf filtered by equality, then not found returned.","allOf":[{"$ref":"#/components/schemas/Op2"}]},{"$ref":"#/components/schemas/Op3"},{"type":"null"}]},"Op":{"description":"Parses tag (anycase), and value in round braces using `from_str`.","oneOf":[{"type":"object","properties":{"le":{"$ref":"#/components/schemas/DataDateTime"}},"required":["le"],"additionalProperties":false}]},"DataDateTime":{"type":"string"},"Op2":{"description":"Parses tag (anycase), and value in round braces using `from_str`.","oneOf":[{"type":"object","properties":{"le":{"type":"integer","format":"uint64","minimum":0}},"required":["le"],"additionalProperties":false}]},"Op3":{"description":"Parses tag (anycase), and value in round braces using `from_str`.","oneOf":[{"type":"object","properties":{"le":{"$ref":"#/components/schemas/Timestamp"}},"required":["le"],"additionalProperties":false}]},"StateDownloadMeta":{"type":"object","properties":{"hash":{"description":"Hash of the state file.\nUsed as ETag.","type":"array","items":{"type":"integer","format":"uint8","minimum":0,"maximum":255},"minItems":32,"maxItems":32},"link":{"description":"Link to download the state file.","type":"string","format":"uri"},"version":{"description":"Version of binary which produced this state snapshot.\nSo can decide whether it is compatible with client.\ntodo(repl): After upgrade release make it non-optional.","anyOf":[{"$ref":"#/components/schemas/BinaryId"},{"type":"null"}]}},"required":["hash","link"]},"BinaryId":{"type":"string"},"SnapshotNotFound":{"type":"string"},"StateInfo":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/ExecutableVersion"},"state":{"$ref":"#/components/schemas/EngineStateHeader"}},"required":["version","state"]},"EngineStateHeader":{"type":"object","properties":{"version":{"type":"integer","format":"uint16","minimum":0,"maximum":65535},"action_id":{"type":"integer","format":"uint64","minimum":0},"action_nonce":{"type":"integer","format":"uint64","minimum":0},"timestamp":{"$ref":"#/components/schemas/TimestampMillis"},"paused":{"type":"boolean"}},"required":["version","action_id","action_nonce","timestamp","paused"]},"TimestampMillis":{"type":"string","minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"StateHistInfo":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"array","maxItems":2,"minItems":2,"items":[{"type":"integer","format":"uint64","minimum":0},{"$ref":"#/components/schemas/ExecutableVersion"}]}}},"required":["versions"]},"FeeTierConfig":{"description":"Use 1/1_000_000 granularity (ppm)\n\n| ppm  | decimal  | percent |\n|------|----------|---------|\n| 1    | 0.000001 | 0.0001% |\n| 5    | 0.000005 | 0.0005% |\n| 10   | 0.00001  | 0.001%  |\n| 50   | 0.00005  | 0.005%  |\n| 100  | 0.0001   | 0.01%   |\n| 500  | 0.0005   | 0.05%   |\n| 1000 | 0.001    | 0.10%   |\n| 5000 | 0.005    | 0.50%   |\n| 10000| 0.01     | 1.00%   |","type":"object","properties":{"maker_fee_ppm":{"type":"integer","format":"uint32","minimum":0},"taker_fee_ppm":{"type":"integer","format":"uint32","minimum":0}},"required":["maker_fee_ppm","taker_fee_ppm"]},"GetAccountsFeeTiersQuery":{"type":"object","properties":{"tier":{"anyOf":[{"$ref":"#/components/schemas/FeeTierId"},{"type":"null"}],"default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","anyOf":[{"$ref":"#/components/schemas/AccountId"},{"type":"null"}]},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null}}},"PageResult_for_AccountId_and_AccountFeeTier":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/AccountFeeTier"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","anyOf":[{"$ref":"#/components/schemas/AccountId"},{"type":"null"}]}},"required":["items"]},"AccountFeeTier":{"type":"object","properties":{"accountId":{"$ref":"#/components/schemas/AccountId"},"feeTier":{"$ref":"#/components/schemas/FeeTierId"}},"required":["accountId","feeTier"]},"AdminInfo":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/RegistrationKey"},"roles":{"type":"array","items":{"type":"string"}}},"required":["key","roles"]},"GetAccountVolumeQuery":{"type":"object","properties":{"accountId":{"$ref":"#/components/schemas/AccountId"},"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"marketId":{"description":"DEPRECATED, use `market_ids` instead.","type":["integer","null"],"minimum":0,"maximum":2147483647},"marketIds":{"type":"array","items":{"type":"integer","minimum":0,"maximum":2147483647},"default":""}},"required":["accountId"]},"AccountVolumeInfo":{"type":"object","properties":{"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"volumeBase":{"type":"number","format":"double"},"volumeQuote":{"type":"number","format":"double"},"volumeQuoteMaker":{"type":"number","format":"double"},"volumeQuoteTaker":{"type":"number","format":"double"}},"required":["marketId","volumeBase","volumeQuote","volumeQuoteMaker","volumeQuoteTaker"]},"PagedQuery":{"type":"object","properties":{"since":{"description":"start with this timestamp (RFC3339); defaults to UNIX epoch start","type":"string","default":null},"until":{"description":"end with this timestamp (RFC3339); defaults to current date-time","type":"string","default":null},"startInclusive":{"description":"fetch results starting with this page; query starts with first entry if page isn't specified","type":["integer","null"],"format":"uint64","minimum":0},"pageSize":{"description":"Query returns up to 50 trades in one go.","type":["integer","null"],"format":"uint8","minimum":1,"maximum":255,"default":null}}},"PageResult_for_uint64_and_WithdrawalInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/WithdrawalInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"WithdrawalInfo":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"accountId":{"$ref":"#/components/schemas/AccountId"},"tokenId":{"$ref":"#/components/schemas/TokenId"},"amount":{"type":"number","format":"double"},"balance":{"type":"number","format":"double"},"fee":{"type":"number","format":"double"},"destPubkey":{"type":["string","null"]}},"required":["time","actionId","accountId","tokenId","amount","balance","fee"]},"PageResult_for_uint64_and_DepositInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/DepositInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"DepositInfo":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"accountId":{"$ref":"#/components/schemas/AccountId"},"tokenId":{"$ref":"#/components/schemas/TokenId"},"amount":{"type":"number","format":"double"},"balance":{"type":"number","format":"double"},"eventIndex":{"type":"integer","format":"uint64","minimum":0}},"required":["time","actionId","accountId","tokenId","amount","balance","eventIndex"]},"PageResult_for_uint64_and_TransferRow":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/TransferRow"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"TransferRow":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"idx":{"description":"Transfer index within the action. Always `0` today since a single action produces at most\none transfer; reserved for future multi-transfer scenarios (atomics, liquidations).","type":"integer","format":"uint16","minimum":0,"maximum":65535},"fromAccountId":{"description":"`None` when the origin is a sys account.","anyOf":[{"$ref":"#/components/schemas/AccountId"},{"type":"null"}]},"toAccountId":{"description":"`None` when the destination is a sys account.","anyOf":[{"$ref":"#/components/schemas/AccountId"},{"type":"null"}]},"specialAccount":{"anyOf":[{"$ref":"#/components/schemas/SpecialAccount"},{"type":"null"}]},"tokenId":{"$ref":"#/components/schemas/TokenId"},"amount":{"$ref":"#/components/schemas/PositiveBalanceMantissa"}},"required":["time","actionId","idx","tokenId","amount"]},"SpecialAccount":{"description":"Unlike normal account, this account does not issues any action nor has key.","type":"string","enum":["FeeVault","ClaimVault"]},"PositiveBalanceMantissa":{"description":"63 bit positive number of tokens.\nSo used as unsided amount (even if negative) and as really positive\n- seems should have 3 types. Same as for size.","type":"integer","format":"uint64","minimum":1},"PageResult_for_uint64_and_VaultConfigRow":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/VaultConfigRow"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"VaultConfigRow":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"vaultId":{"$ref":"#/components/schemas/VaultId"},"depositCap":{"$ref":"#/components/schemas/PositiveQuoteSize"},"openPositionDiscountBps":{"type":"integer","format":"uint16","minimum":0,"maximum":65535},"drawdownProtectionBps":{"type":"integer","format":"uint16","minimum":0,"maximum":65535},"drawdownFreezeBps":{"type":"integer","format":"uint16","minimum":0,"maximum":65535},"epochMinDurationSec":{"$ref":"#/components/schemas/U63"}},"required":["time","actionId","vaultId","depositCap","openPositionDiscountBps","drawdownProtectionBps","drawdownFreezeBps","epochMinDurationSec"]},"U63":{"description":"Unsigned 63 bit integer","type":"integer","format":"uint64","minimum":0},"PageResult_for_uint64_and_VaultDepositRow":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/VaultDepositRow"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"VaultDepositRow":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"vaultId":{"$ref":"#/components/schemas/VaultId"},"accountId":{"$ref":"#/components/schemas/AccountId"},"vaultAccountId":{"$ref":"#/components/schemas/AccountId"},"amount":{"$ref":"#/components/schemas/PositiveBalanceMantissa"},"sharesIssued":{"type":"integer","format":"uint128","minimum":0},"userShares":{"type":"integer","format":"uint128","minimum":0},"liveShareSupply":{"type":"integer","format":"uint128","minimum":0},"balance":{"type":"integer","format":"int64"},"status":{"$ref":"#/components/schemas/VaultStatus"}},"required":["time","actionId","vaultId","accountId","vaultAccountId","amount","sharesIssued","userShares","liveShareSupply","balance","status"]},"PageResult_for_uint64_and_VaultWithdrawalRow":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/VaultWithdrawalRow"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"VaultWithdrawalRow":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"vaultId":{"$ref":"#/components/schemas/VaultId"},"accountId":{"$ref":"#/components/schemas/AccountId"},"vaultAccountId":{"$ref":"#/components/schemas/AccountId"},"kind":{"$ref":"#/components/schemas/VaultWithdrawalKind"},"amount":{"$ref":"#/components/schemas/U63"},"sharesBurned":{"type":["integer","null"],"format":"uint128","minimum":0},"userShares":{"type":"integer","format":"uint128","minimum":0},"liveShareSupply":{"type":"integer","format":"uint128","minimum":0},"balance":{"type":"integer","format":"int64"},"status":{"$ref":"#/components/schemas/VaultStatus"}},"required":["time","actionId","vaultId","accountId","vaultAccountId","kind","amount","userShares","liveShareSupply","balance","status"]},"VaultWithdrawalKind":{"type":"string","enum":["Requested","Claimed"]},"PageResult_for_uint64_and_VaultEpochHistoryInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/VaultEpochHistoryInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"VaultEpochHistoryInfo":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"vaultId":{"$ref":"#/components/schemas/VaultId"},"closedEpochId":{"$ref":"#/components/schemas/EpochId"},"currentEpochId":{"$ref":"#/components/schemas/EpochId"},"currentEpochStartedAt":{"$ref":"#/components/schemas/Timestamp"},"paidThroughEpochId":{"anyOf":[{"$ref":"#/components/schemas/EpochId"},{"type":"null"}]},"withdrawalsCurrentEpoch":{"$ref":"#/components/schemas/U63"},"withdrawalsPreviousEpoch":{"$ref":"#/components/schemas/U63"},"withdrawalsClaimable":{"$ref":"#/components/schemas/U63"},"latestEpochPpsRefEpochId":{"anyOf":[{"$ref":"#/components/schemas/EpochId"},{"type":"null"}]},"latestEpochPpsRefSafeAccountValue":{"type":["integer","null"],"format":"uint128","minimum":0},"latestEpochPpsRefShareSupply":{"type":["integer","null"],"format":"uint128","minimum":0},"priorEpochPpsRefEpochId":{"anyOf":[{"$ref":"#/components/schemas/EpochId"},{"type":"null"}]},"priorEpochPpsRefSafeAccountValue":{"type":["integer","null"],"format":"uint128","minimum":0},"priorEpochPpsRefShareSupply":{"type":["integer","null"],"format":"uint128","minimum":0},"claimableAmount":{"$ref":"#/components/schemas/U63"},"liveShareSupply":{"type":"integer","format":"uint128","minimum":0},"balance":{"type":"integer","format":"int64"},"status":{"$ref":"#/components/schemas/VaultStatus"}},"required":["time","actionId","vaultId","closedEpochId","currentEpochId","currentEpochStartedAt","withdrawalsCurrentEpoch","withdrawalsPreviousEpoch","withdrawalsClaimable","claimableAmount","liveShareSupply","balance","status"]},"PageResult_for_uint64_and_LiquidationInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/LiquidationInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"LiquidationInfo":{"type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"liquidatorId":{"$ref":"#/components/schemas/AccountId"},"liquidateeId":{"$ref":"#/components/schemas/AccountId"},"fee":{"type":"number","format":"double"},"liquidationKind":{"$ref":"#/components/schemas/LiquidationKind"},"marketId":{"type":["integer","null"],"minimum":0,"maximum":2147483647},"tokenId":{"anyOf":[{"$ref":"#/components/schemas/TokenId"},{"type":"null"}]},"orderId":{"type":["integer","null"],"format":"uint64","minimum":0},"orderPrice":{"type":["number","null"],"format":"double"},"orderSize":{"type":["number","null"],"format":"double"},"orderQuote":{"type":["number","null"],"format":"double"},"preOmf":{"type":"number","format":"double"},"preMmf":{"type":"number","format":"double"},"preImf":{"type":"number","format":"double"},"preCmf":{"type":"number","format":"double"},"prePon":{"type":"number","format":"double"},"preMf":{"type":"number","format":"double"},"prePn":{"type":"number","format":"double"},"postOmf":{"type":"number","format":"double"},"postMmf":{"type":"number","format":"double"},"postImf":{"type":"number","format":"double"},"postCmf":{"type":"number","format":"double"},"postPon":{"type":"number","format":"double"},"postMf":{"type":"number","format":"double"},"postPn":{"type":"number","format":"double"}},"required":["time","actionId","liquidatorId","liquidateeId","fee","liquidationKind","preOmf","preMmf","preImf","preCmf","prePon","preMf","prePn","postOmf","postMmf","postImf","postCmf","postPon","postMf","postPn"]},"LiquidationKind":{"oneOf":[{"description":"Place an order on behalf of the user to close a position.","type":"string","const":"place_order"},{"description":"Cancel an order on behalf of the user if their open fraction is too small.","type":"string","const":"cancel_order"},{"description":"The user is bankrupt.","type":"string","const":"bankruptcy_or_take"}]},"SystemBalances":{"type":"object","properties":{"actionId":{"type":"integer","format":"uint64","minimum":0},"feeVault":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}},"claimVault":{"type":"array","items":{"$ref":"#/components/schemas/Balance"}}},"required":["actionId","feeVault","claimVault"]},"TakeAllInfo":{"description":"Produced for each position taken from maker(liquidatee) by maker(backstop account)","type":"object","properties":{"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"takerAccountId":{"$ref":"#/components/schemas/AccountId"},"takerSide":{"$ref":"#/components/schemas/Side"},"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"settlementPrice":{"type":"number","format":"double"},"baseSize":{"type":"number","format":"double"},"makerAccountId":{"$ref":"#/components/schemas/AccountId"},"bankruptcyPrice":{"type":"number","format":"double"}},"required":["time","actionId","takerAccountId","takerSide","marketId","settlementPrice","baseSize","makerAccountId","bankruptcyPrice"]},"TvConfigResponse":{"description":"TV config query response\nhttps://www.tradingview.com/charting-library-docs/latest/connecting_data/UDF/#data-feed-configuration-data","type":"object","properties":{"supported_resolutions":{"type":"array","items":{"$ref":"#/components/schemas/Resolution"}},"supports_group_request":{"type":"boolean"},"supports_marks":{"type":"boolean"},"supports_search":{"type":"boolean"},"supports_timescale_marks":{"type":"boolean"}},"required":["supported_resolutions","supports_group_request","supports_marks","supports_search","supports_timescale_marks"]},"Resolution":{"description":"More limited resolution than history one, used in some HTTP queries","type":"string","enum":["OneMinute","FiveMinutes","FifteenMinutes","ThirtyMinutes","SixtyMinutes","FourHours","OneDay","OneWeek","OneMonth"]},"TvSymbolsQuery":{"description":"TV symbols query","type":"object","properties":{"symbol":{"type":"string"}},"required":["symbol"]},"TvSymbolsResult":{"type":"object","properties":{"description":{"type":"string"},"exchange":{"type":"string"},"has_intraday":{"type":"boolean"},"has_empty_bars":{"type":"boolean"},"has_weekly_and_monthly":{"type":"boolean"},"format":{"$ref":"#/components/schemas/TvSymbolsFormat"},"listed_exchange":{"type":"string"},"minmov":{"type":"integer","format":"int64"},"name":{"type":"string"},"pricescale":{"type":"integer","format":"int64"},"session":{"type":"string"},"supported_resolutions":{"type":"array","items":{"$ref":"#/components/schemas/Resolution"}},"ticker":{"type":"string"},"timezone":{"type":"string"},"type":{"type":"string"}},"required":["description","exchange","has_intraday","has_empty_bars","has_weekly_and_monthly","format","listed_exchange","minmov","name","pricescale","session","supported_resolutions","ticker","timezone","type"]},"TvSymbolsFormat":{"type":"string","enum":["price","volume"]},"MarketSymbolNotFound":{"type":"object","properties":{"symbol":{"type":"string"}},"required":["symbol"]},"TvSearchQuery":{"type":"object","properties":{"query":{"type":"string"},"type":{"type":"string"},"exchange":{"type":"string"},"limit":{"type":"integer","format":"uint32","minimum":0}},"required":["query","type","exchange","limit"]},"TvSearchResponseItem":{"type":"object","properties":{"description":{"type":"string"},"exchange":{"type":"string"},"symbol":{"type":"string"},"ticker":{"type":"string"},"type":{"type":"string"}},"required":["description","exchange","symbol","ticker","type"]},"TvHistoryQuery":{"description":"History query\nhttps://www.tradingview.com/charting-library-docs/latest/connecting_data/UDF/#bars\n\n# Extension:\nAccepts either:\n* `market_id` - raw market identifier\n* `symbol` - market symbol from original spec, picks first market which matches it","type":"object","properties":{"market_id":{"type":["integer","null"],"minimum":0,"maximum":2147483647},"symbol":{"type":["string","null"]},"from":{"type":"string"},"to":{"type":"string"},"resolution":{"$ref":"#/components/schemas/Resolution"},"countback":{"type":["integer","null"],"format":"uint16","minimum":0,"maximum":65535}},"required":["to","resolution"]},"TvHistoryResponse":{"oneOf":[{"type":"object","properties":{"nextTime":{"type":"string"},"s":{"type":"string","const":"no_data"}},"required":["s"]},{"description":"History variant which actually contains data\n\n`f64` are used to represent values as bare numbers, see\nhttps://www.tradingview.com/charting-library-docs/latest/connecting_data/UDF/#bars\n`Notes` section","type":"object","properties":{"t":{"type":"array","items":{"type":"integer","format":"int64"}},"o":{"type":"array","items":{"type":"number","format":"double"}},"c":{"type":"array","items":{"type":"number","format":"double"}},"h":{"type":"array","items":{"type":"number","format":"double"}},"l":{"type":"array","items":{"type":"number","format":"double"}},"v":{"type":"array","items":{"type":"number","format":"double"}},"s":{"type":"string","const":"ok"}},"required":["s","t","o","c","h","l","v"]}]},"error":{"type":"object","properties":{"errmsg":{"type":"string"}},"required":["errmsg"]},"TvQuotesQuery":{"type":"object","properties":{"symbols":{"description":"Comma-delimited list of symbols","type":"string"}},"required":["symbols"]},"ok":{"type":"object","properties":{"d":{"type":"array","items":{"$ref":"#/components/schemas/TvQuotesItem"}}},"required":["d"]},"TvQuotesItem":{"description":"Quotes entry,\nsee https://www.tradingview.com/charting-library-docs/latest/api/modules/Datafeed/#quotedata","oneOf":[{"description":"Quotes success entry,\nsee https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Datafeed.QuoteOkData/","type":"object","properties":{"n":{"type":"string"},"v":{"$ref":"#/components/schemas/TvQuotesValues"},"s":{"type":"string","const":"ok"}},"required":["s","n","v"]},{"description":"Quotes error entry,\nsee https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Datafeed.QuoteErrorData/\n\n# Note\nAPI spec isn't clear about entry data, it requires `v: QuoteValues`.\nProbably it should've been `errmsg: String`, but in order to conform to API,\nwe leave `v: {}`, i.e. empty object","type":"object","properties":{"n":{"type":"string"},"v":{"$ref":"#/components/schemas/TvQuotesErrorValues"},"s":{"type":"string","const":"error"}},"required":["s","n","v"]}]},"TvQuotesValues":{"description":"Datafeed quote values,\nsee https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Datafeed.DatafeedQuoteValues/ for details\nField renames are due to spec","type":"object","properties":{"ask":{"description":"Current best, i.e. lowest, ask price, if present","type":["number","null"],"format":"double"},"bid":{"description":"Current best, i.e. highest, bid price, if present","type":["number","null"],"format":"double"},"ch":{"description":"Delta between last price and previous close price","type":["number","null"],"format":"double"},"chp":{"description":"Percentage delta between last price and previous close price","type":["number","null"],"format":"double"},"description":{"type":["string","null"]},"exchange":{"type":["string","null"]},"high_price":{"type":["number","null"],"format":"double"},"low_price":{"type":["number","null"],"format":"double"},"lp":{"description":"Current last trade price, no matter whether it was bid or ask","type":["number","null"],"format":"double"},"open_price":{"description":"Trade price of the first trade which happened in current session","type":["number","null"],"format":"double"},"original_name":{"type":["string","null"]},"prev_close_price":{"description":"Last trade price of previous session","type":["number","null"],"format":"double"},"rch":{"type":["number","null"],"format":"double"},"rchp":{"type":["number","null"],"format":"double"},"rtc":{"type":["number","null"],"format":"double"},"rtc_time":{"type":"string"},"short_name":{"type":["string","null"]},"spread":{"description":"Delta between current bid and ask prices.\nAlways non for RFQ.","type":["number","null"],"format":"double"},"volume":{"type":["number","null"],"format":"double"}}},"TvQuotesErrorValues":{"description":"Empty object, to make quotes item conform to API error spec","type":"object"},"GetMarketHistoryQuery":{"type":"object","properties":{"startInclusive":{"type":["integer","null"],"format":"uint64","minimum":0,"default":null},"pageSize":{"type":"integer","format":"uint8","minimum":1,"maximum":255,"default":24}}},"PageResult_for_uint64_and_MarketHistoryInfo":{"type":"object","properties":{"items":{"description":"Set of items for requested by query.","type":"array","items":{"$ref":"#/components/schemas/MarketHistoryInfo"}},"nextStartInclusive":{"description":"If request contains more data,\nthis is the id is set with which next request should be performed to get next page.\nIf no more data, then it is undefined.","type":["integer","null"],"format":"uint64","minimum":0}},"required":["items"]},"MarketHistoryInfo":{"type":"object","properties":{"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"time":{"type":"string"},"actionId":{"type":"integer","format":"uint64","minimum":0},"fundingIndex":{"$ref":"#/components/schemas/FundingIndexMantissa"},"fundingRate":{"type":"number","format":"double"},"indexPrice":{"description":"Scaled in market price decimals","type":"number","format":"double"},"markPrice":{"type":"number","format":"double"}},"required":["marketId","time","actionId","fundingIndex","fundingRate","indexPrice","markPrice"]},"FundingIndexMantissa":{"description":"Consist of some sum of `SignedPerMillion` weighted by `PriceMantissa`(with market decimals).\nFunding rate jitters around 0, so really hard to get big numbers.\nIs `basic points numerator * market price mantissa` unit.","type":"integer","format":"int128"},"UpdatePayload":{"oneOf":[{"description":"Market orderbook update with L2 level information (no specifics about an order nor account).","type":"object","properties":{"delta":{"$ref":"#/components/schemas/DeltaUpdatePayload"}},"required":["delta"],"additionalProperties":false},{"description":"Market fills","type":"object","properties":{"trades":{"$ref":"#/components/schemas/TradesUpdatePayload"}},"required":["trades"],"additionalProperties":false},{"description":"All account updates, including placement, (partial) fills, and (partial) cancellations.","type":"object","properties":{"account":{"$ref":"#/components/schemas/AccountUpdatePayload"}},"required":["account"],"additionalProperties":false},{"type":"object","properties":{"liquidation":{"$ref":"#/components/schemas/LiquidationUpdatePayload"}},"required":["liquidation"],"additionalProperties":false},{"type":"object","properties":{"vault":{"$ref":"#/components/schemas/VaultUpdatePayload"}},"required":["vault"],"additionalProperties":false},{"type":"object","properties":{"rfqFills":{"$ref":"#/components/schemas/RfqFillsUpdatePayload"}},"required":["rfqFills"],"additionalProperties":false}]},"DeltaUpdatePayload":{"type":"object","properties":{"last_update_id":{"type":"integer","format":"uint64","minimum":0},"update_id":{"type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"market_symbol":{"type":"string"},"asks":{"type":"array","items":{"type":"array","maxItems":2,"minItems":2,"items":[{"type":"number","format":"double"},{"type":"number","format":"double"}]}},"bids":{"type":"array","items":{"type":"array","maxItems":2,"minItems":2,"items":[{"type":"number","format":"double"},{"type":"number","format":"double"}]}}},"required":["last_update_id","update_id","physical_time","market_symbol","asks","bids"]},"TradesUpdatePayload":{"type":"object","properties":{"last_update_id":{"type":"integer","format":"uint64","minimum":0},"update_id":{"type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"market_symbol":{"type":"string"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/TradeUpdate"}}},"required":["last_update_id","update_id","physical_time","market_symbol","trades"]},"TradeUpdate":{"type":"object","properties":{"action_id":{"type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"trade_id":{"type":"integer","format":"uint64","minimum":0},"side":{"$ref":"#/components/schemas/Side"},"price":{"type":"number","format":"double"},"size":{"type":"number","format":"double"},"order_id":{"type":"integer","format":"uint64","minimum":0},"sender_tracking_id":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19,"deprecated":true}},"required":["action_id","physical_time","trade_id","side","price","size","order_id"]},"AccountUpdatePayload":{"type":"object","properties":{"last_update_id":{"type":"integer","format":"uint64","minimum":0},"update_id":{"type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"account_id":{"$ref":"#/components/schemas/AccountId"},"fills":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FillUpdate"}},"places":{"type":"object","additionalProperties":false,"patternProperties":{"^\\d+$":{"$ref":"#/components/schemas/OrderUpdate"}}},"cancels":{"type":"object","additionalProperties":false,"patternProperties":{"^\\d+$":{"$ref":"#/components/schemas/OrderUpdate"}}},"reduced_orders":{"description":"Reduce orders: fully cancelled or partially cancelled (shrunk in-place).","type":"object","additionalProperties":false,"patternProperties":{"^\\d+$":{"$ref":"#/components/schemas/OrderUpdate"}}},"self_trade_cancels":{"description":"Maker orders removed by self-trade prevention.","type":"object","additionalProperties":false,"patternProperties":{"^\\d+$":{"$ref":"#/components/schemas/OrderUpdate"}}},"balances":{"type":"object","additionalProperties":false,"patternProperties":{"^\\d+$":{"type":"number","format":"double"}}}},"required":["last_update_id","update_id","physical_time","account_id","fills","places","cancels","balances"]},"FillUpdate":{"type":"object","properties":{"action_id":{"description":"Action metadata for the latest fill folded into this order-keyed update.","type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"trade_ids":{"description":"All trade ids folded into this update. Account fills are keyed by order id,\nso a websocket batch may coalesce multiple fills for the same order.","type":"array","items":{"type":"integer","format":"uint64","minimum":0}},"side":{"$ref":"#/components/schemas/Side"},"quantity":{"type":"number","format":"double"},"remaining":{"type":"number","format":"double"},"price":{"type":"number","format":"double"},"order_id":{"type":"integer","format":"uint64","minimum":0},"market_id":{"type":"integer","format":"uint32","minimum":0},"maker_id":{"$ref":"#/components/schemas/AccountId"},"taker_id":{"$ref":"#/components/schemas/AccountId"},"sender_tracking_id":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19,"deprecated":true},"client_order_id":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19},"taker_client_order_id":{"type":"array","items":{"type":"string","minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19}}},"required":["action_id","physical_time","trade_ids","side","quantity","remaining","price","order_id","market_id","maker_id","taker_id"]},"OrderUpdate":{"type":"object","properties":{"action_id":{"type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"side":{"$ref":"#/components/schemas/Side"},"current_size":{"description":"Absolute size of order as it became after some change.","type":"number","format":"double"},"price":{"type":"number","format":"double"},"market_id":{"type":"integer","format":"uint32","minimum":0},"sender_tracking_id":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19,"deprecated":true},"client_order_id":{"type":["string","null"],"minLength":1,"pattern":"^(?:0|[1-9][0-9]*)$","maxLength":19}},"required":["action_id","physical_time","side","current_size","price","market_id"]},"LiquidationUpdatePayload":{"type":"object","properties":{"last_update_id":{"type":"integer","format":"uint64","minimum":0},"update_id":{"type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"liquidations":{"type":"array","items":{"$ref":"#/components/schemas/LiquidationUpdate"}}},"required":["last_update_id","update_id","physical_time","liquidations"]},"LiquidationUpdate":{"type":"object","properties":{"makerAccountId":{"$ref":"#/components/schemas/AccountId"},"takerAccountId":{"$ref":"#/components/schemas/AccountId"},"takerBalances":{"type":"array","items":{"$ref":"#/components/schemas/LiquidationBalance"}},"takerPositions":{"type":"array","items":{"$ref":"#/components/schemas/LiquidatedPosition"}}},"required":["makerAccountId","takerAccountId","takerBalances","takerPositions"]},"LiquidationBalance":{"type":"object","properties":{"tokenId":{"$ref":"#/components/schemas/TokenId"},"amount":{"type":"number","format":"double"}},"required":["tokenId","amount"]},"LiquidatedPosition":{"type":"object","properties":{"marketId":{"type":"integer","format":"uint32","minimum":0},"accountId":{"$ref":"#/components/schemas/AccountId"},"perp":{"anyOf":[{"$ref":"#/components/schemas/PerpPosition"},{"type":"null"}]}},"required":["marketId","accountId"]},"PerpPosition":{"type":"object","properties":{"baseSize":{"type":"number","format":"double"},"price":{"type":"number","format":"double"},"updatedFundingRateIndex":{"type":"number","format":"double"}},"required":["baseSize","price","updatedFundingRateIndex"]},"VaultUpdatePayload":{"type":"object","properties":{"last_update_id":{"type":"integer","format":"uint64","minimum":0},"update_id":{"type":"integer","format":"uint64","minimum":0},"physical_time":{"type":"string"},"vault_id":{"$ref":"#/components/schemas/VaultId"},"vault":{"$ref":"#/components/schemas/VaultViewState"}},"required":["last_update_id","update_id","physical_time","vault_id","vault"]},"RfqFillsUpdatePayload":{"type":"object","properties":{"last_update_id":{"type":"integer","format":"uint64","minimum":0},"update_id":{"type":"integer","format":"uint64","minimum":0},"market_id":{"type":"integer","minimum":0,"maximum":2147483647},"requests":{"type":"array","items":{"$ref":"#/components/schemas/RfqFillRequestUpdate"}}},"required":["last_update_id","update_id","market_id","requests"]},"RfqFillRequestUpdate":{"description":"When user asked for fill via RFQ,\nthis message send to all subscribed MMs (who can take user order).","type":"object","properties":{"updateId":{"type":"integer","format":"uint64","minimum":0},"orderId":{"type":"integer","format":"uint64","minimum":0},"marketId":{"type":"integer","minimum":0,"maximum":2147483647},"side":{"$ref":"#/components/schemas/Side"},"size":{"type":"number","format":"double"},"sizeRaw":{"description":"Used to form action, so we give exact size integer here.","allOf":[{"$ref":"#/components/schemas/PositiveSize"}]},"timeoutMillis":{"description":"Relative to timestamp.","allOf":[{"$ref":"#/components/schemas/DurationMillis"}]},"timestamp":{"description":"Add `timeout_millis` to this timestamp to determine expiry.\nThis is a delivery-side filter only; the engine performs authoritative\ntimeout validation when a maker submits `RfqTrade`.","type":"integer","format":"uint64","minimum":0}},"required":["updateId","orderId","marketId","side","size","sizeRaw","timeoutMillis","timestamp"]},"DurationMillis":{"type":"integer","minimum":0,"maximum":2147483647},"CandleUpdate":{"type":"object","properties":{"res":{"description":"TradingView resolution.","allOf":[{"$ref":"#/components/schemas/Resolution"}]},"mid":{"description":"Market id.","type":"integer","format":"uint32","minimum":0},"t":{"description":"Timestamp in seconds.","type":"integer","format":"int64"},"o":{"description":"Open price.","type":"number","format":"double"},"h":{"description":"High price.","type":"number","format":"double"},"l":{"description":"Low price.","type":"number","format":"double"},"c":{"description":"Close price.","type":"number","format":"double"},"v":{"description":"Volume in the quote currency, i.e. USDC.","type":"number","format":"double"}},"required":["res","mid","t","o","h","l","c","v"]},"SelfTradePrevention":{"type":"string","enum":["expireMaker"]},"AttachedTriggers":{"description":"One or two triggers attached to a parent order.\n\nA pair links take-profit and stop-loss as cancelling siblings.","oneOf":[{"type":"object","properties":{"Single":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/Kind"},"prices":{"$ref":"#/components/schemas/Prices"}},"required":["kind","prices"]}},"required":["Single"],"additionalProperties":false},{"type":"object","properties":{"Pair":{"type":"object","properties":{"take_profit_prices":{"$ref":"#/components/schemas/Prices"},"stop_loss_prices":{"$ref":"#/components/schemas/Prices"}},"required":["take_profit_prices","stop_loss_prices"]}},"required":["Pair"],"additionalProperties":false}]},"Prices":{"type":"object","properties":{"trigger":{"$ref":"#/components/schemas/PositivePriceMantissa"},"limit":{"anyOf":[{"$ref":"#/components/schemas/PositivePriceMantissa"},{"type":"null"}]}},"required":["trigger"]},"TopicInfo":{"oneOf":[{"type":"object","properties":{"Trades":{"type":"object","properties":{"market_id":{"type":"integer","format":"uint32","minimum":0}},"required":["market_id"]}},"required":["Trades"],"additionalProperties":false},{"description":"Sends latest state of entity, some intermediate states may be omitted,\nbut always pushes latest state.","type":"object","properties":{"Deltas":{"type":"object","properties":{"market_id":{"type":"integer","format":"uint32","minimum":0}},"required":["market_id"]}},"required":["Deltas"],"additionalProperties":false},{"type":"object","properties":{"Account":{"type":"object","properties":{"account_id":{"$ref":"#/components/schemas/AccountId"}},"required":["account_id"]}},"required":["Account"],"additionalProperties":false},{"type":"object","properties":{"Vault":{"type":"object","properties":{"vault_id":{"$ref":"#/components/schemas/VaultId"}},"required":["vault_id"]}},"required":["Vault"],"additionalProperties":false},{"type":"object","properties":{"Candle":{"type":"object","properties":{"market_id":{"type":"integer","format":"uint32","minimum":0},"resolution":{"$ref":"#/components/schemas/Resolution"}},"required":["market_id","resolution"]}},"required":["Candle"],"additionalProperties":false},{"description":"Parameter free subscription to take all actions.","type":"string","const":"Liquidations"},{"description":"Per-market RFQ execution requests and funding samples.","type":"object","properties":{"RfqFills":{"type":"object","properties":{"market_id":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["market_id"]}},"required":["RfqFills"],"additionalProperties":false}]},"WsRequestMessage":{"type":"object","properties":{"updates":{"type":"array","items":{"$ref":"#/components/schemas/TopicReq"}}},"required":["updates"]},"TopicReq":{"oneOf":[{"type":"object","properties":{"topic":{"type":"string"},"action":{"type":"string","const":"sub"}},"required":["action","topic"]},{"type":"object","properties":{"topic":{"type":"string"},"action":{"type":"string","const":"unsub"}},"required":["action","topic"]}]},"WsResponseMessage":{"oneOf":[{"type":"object","properties":{"updates":{"type":"array","items":{"$ref":"#/components/schemas/TopicResp"}},"type":{"type":"string","const":"success"}},"required":["type","updates"]},{"type":"object","properties":{"code":{"$ref":"#/components/schemas/WsError"},"type":{"type":"string","const":"error"}},"required":["type","code"]}]},"TopicResp":{"type":"object","properties":{"req":{"$ref":"#/components/schemas/TopicReq"}},"required":["req"],"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"]},{"type":"object","properties":{"code":{"$ref":"#/components/schemas/TopicError"},"message":{"type":"string"},"status":{"type":"string","const":"error"}},"required":["status","code","message"]}]},"TopicError":{"type":"string","enum":["ParseAccountId","AccountNotFound","ParseVaultId","VaultNotFound","ParseInvalidCandleStr","MarketNotFound","ParseUnknownRes","ParseInvalidTopicStr","TooManySubs","AlreadySubscribed","NotSubscribed"]},"WsError":{"type":"string","enum":["invalid"]},"TopicOutcome":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"success"}},"required":["status"]},{"type":"object","properties":{"code":{"$ref":"#/components/schemas/TopicError"},"message":{"type":"string"},"status":{"type":"string","const":"error"}},"required":["status","code","message"]}]}}}}