{"openapi":"3.0.0","info":{"title":"Velocity Data API","version":"1.0.0"},"components":{"schemas":{"WsSubscriptionAck":{"type":"object","description":"Sent once, immediately after a successful `subscribe` message.","properties":{"type":{"type":"string","enum":["subscription"]},"message":{"type":"string","example":"Subscribed to markets updates"},"channelType":{"type":"string"},"channel":{"type":"string"},"symbol":{"type":"string","description":"Only present for the candle channel"},"resolution":{"type":"string","description":"Only present for the candle channel"}},"required":["type","channelType","channel"]},"WsError":{"type":"object","description":"Sent when a message could not be processed, e.g. an unknown or malformed `channelType` (this currently includes `orderbook` and `user`, which are reserved but not yet implemented).","properties":{"type":{"type":"string","enum":["error"]},"message":{"type":"string","example":"Unknown channel type: orderbook"}},"required":["type","message"]},"WsCandle":{"type":"object","description":"One OHLC candle bucket for a symbol/resolution.","properties":{"symbol":{"type":"string"},"ts":{"type":"integer","description":"Candle bucket start time, in seconds"},"resolution":{"type":"string"},"fillOpen":{"type":"number"},"fillHigh":{"type":"number"},"fillClose":{"type":"number"},"fillLow":{"type":"number"},"oracleOpen":{"type":"number"},"oracleHigh":{"type":"number"},"oracleClose":{"type":"number"},"oracleLow":{"type":"number"},"quoteVolume":{"type":"number"},"baseVolume":{"type":"number"},"lastTradeTs":{"type":"integer","nullable":true},"lastFillRecordId":{"type":"string","nullable":true}}},"WsTrade":{"type":"object","description":"A single fill that occurred within the candle bucket (a filtered OrderActionRecord). Core fields are listed below; additional fields may be present.","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"slot":{"type":"integer"},"action":{"type":"string","example":"fill"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"symbol":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"baseAssetAmountFilled":{"type":"number"},"quoteAssetAmountFilled":{"type":"number"},"oraclePrice":{"type":"number"},"takerFee":{"type":"number"},"makerFee":{"type":"number"}},"additionalProperties":true},"WsMarketSummary":{"type":"object","description":"Combined market metadata, 24h volume, and pricing snapshot.","properties":{"symbol":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"oraclePrice":{"type":"string"},"price":{"type":"string"},"markPrice":{"type":"string"},"quoteVolume":{"type":"string"},"baseVolume":{"type":"string"},"openInterest":{"type":"object","properties":{"long":{"type":"string"},"short":{"type":"string"}}},"fundingRate":{"type":"object","properties":{"long":{"type":"string"},"short":{"type":"string"}}},"priceChange24h":{"type":"string","nullable":true},"priceChange24hPercent":{"type":"string","nullable":true}},"additionalProperties":true},"WsPricingData":{"type":"object","properties":{"symbol":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"oraclePrice":{"type":"string"},"oraclePriceSlot":{"type":"integer"},"price":{"type":"string"},"markPrice":{"type":"string"},"markPriceSlot":{"type":"integer"}},"required":["symbol","marketIndex","marketType","oraclePrice","oraclePriceSlot","price"]},"WsNotification":{"type":"object","properties":{"notificationId":{"type":"string"},"authorityId":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"channels":{"type":"array","items":{"type":"string"}},"data":{"type":"object"},"actions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"link":{"type":"string"}}}},"sentAt":{"type":"integer"},"createdAt":{"type":"integer"}}},"WsCandleInitMessage":{"type":"object","description":"Snapshot sent right after subscribing to the candle channel.","properties":{"type":{"type":"string","enum":["init"]},"channelType":{"type":"string","enum":["candle"]},"symbol":{"type":"string"},"resolution":{"type":"string"},"data":{"$ref":"#/components/schemas/WsCandle"},"candle":{"allOf":[{"$ref":"#/components/schemas/WsCandle"}],"description":"Duplicate of `data`, kept for backward compatibility."}},"required":["type","channelType","symbol","resolution","data"]},"WsCandleUpdateMessage":{"type":"object","description":"Pushed on every new candle or new trade for the subscribed symbol/resolution. Unlike every other channel, this message has no `channelType`/`channel` envelope (legacy shape). `trades` is `[]` when the candle updated without a new fill in this bucket.","properties":{"type":{"type":"string","enum":["create","update"]},"candle":{"$ref":"#/components/schemas/WsCandle"},"trades":{"type":"array","items":{"$ref":"#/components/schemas/WsTrade"}}},"required":["type","candle","trades"]},"WsMarketsInitMessage":{"type":"object","description":"Snapshot sent right after subscribing to the markets channel.","properties":{"type":{"type":"string","enum":["init"]},"channelType":{"type":"string","enum":["markets"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WsMarketSummary"}}},"required":["type","channelType","data"]},"WsMarketsUpdateMessage":{"type":"object","properties":{"type":{"type":"string","enum":["update"]},"channelType":{"type":"string","enum":["markets"]},"channel":{"type":"string","enum":["markets:summary"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WsMarketSummary"}}},"required":["type","channelType","channel","data"]},"WsPricingInitMessage":{"type":"object","description":"Snapshot sent right after subscribing to the pricing channel.","properties":{"type":{"type":"string","enum":["init"]},"channelType":{"type":"string","enum":["pricing"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WsPricingData"}}},"required":["type","channelType","data"]},"WsPricingUpdateMessage":{"type":"object","properties":{"type":{"type":"string","enum":["update"]},"channelType":{"type":"string","enum":["pricing"]},"channel":{"type":"string","enum":["pricing"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WsPricingData"}}},"required":["type","channelType","channel","data"]},"WsNotificationsUpdateMessage":{"type":"object","description":"The notifications channel never sends an `init` snapshot — only this `update` message, one per notification.","properties":{"type":{"type":"string","enum":["update"]},"channelType":{"type":"string","enum":["notifications"]},"channel":{"type":"string","example":"notifications:<authorityId>"},"data":{"$ref":"#/components/schemas/WsNotification"}},"required":["type","channelType","channel","data"]},"def-0":{"type":"object","required":["x-wallet-address","x-signature","x-signed-message"],"properties":{"x-wallet-address":{"type":"string","description":"Solana wallet address"},"x-signature":{"type":"string","description":"Signed message signature"},"x-signed-message":{"type":"string","description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}},"title":"claimAuthHeaders"},"def-1":{"type":"object","required":["x-wallet-address","x-signature","x-signed-message"],"properties":{"x-wallet-address":{"type":"string","description":"Solana wallet address"},"x-signature":{"type":"string","description":"Signed message signature"},"x-signed-message":{"type":"string","description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}},"title":"authHeaders"},"def-2":{"type":"object","required":["x-wallet-address","x-signature","x-signed-message"],"properties":{"x-wallet-address":{"type":"string","description":"Solana wallet address"},"x-signature":{"type":"string","description":"Signed message signature"},"x-signed-message":{"type":"string","description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}},"title":"whitelistAuthHeaders"}}},"paths":{"/ws":{"get":{"tags":["WebSocket"],"description":"<p>Establish a WebSocket connection to receive real-time market data updates from Velocity protocol.</p>\n\t\t\t\t\t\t<p>After connecting, send a <code>subscribe</code> message for one of the channel types below. The server then replies with a subscription acknowledgement, followed by an <code>init</code> snapshot (where applicable) and then a stream of <code>update</code>/<code>create</code> messages. The response shape differs by <code>channelType</code> &mdash; see the schemas on the <code>101</code> response. Note that the <code>candle</code> channel's <code>create</code>/<code>update</code> messages are a legacy shape kept for backward compatibility: they omit the <code>channelType</code>/<code>channel</code> envelope fields that every other channel includes.</p>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h2>Candle Subscription</h2>\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"subscribe\",\n\t\t\t\t\t\t\t\t\t\"channelType\": \"candle\",\n\t\t\t\t\t\t\t\t\t\"symbol\": \"SOL-PERP\",\n\t\t\t\t\t\t\t\t\t\"resolution\": \"1\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t<h2>Market Subscription</h2>\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"subscribe\",\n\t\t\t\t\t\t\t\t\t\"channelType\": \"markets\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t<h2>Pricing Subscription</h2>\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"subscribe\",\n\t\t\t\t\t\t\t\t\t\"channelType\": \"pricing\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t<h2>Notifications Subscription</h2>\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"subscribe\",\n\t\t\t\t\t\t\t\t\t\"channelType\": \"notifications\",\n\t\t\t\t\t\t\t\t\t\"authority\": \"&lt;authorityId&gt;\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t<h2>Orderbook Subscription (not yet implemented)</h2>\n\t\t\t\t\t\t\t<p>Reserved for future use &mdash; subscribing currently returns an <code>error</code> response (&quot;Unknown channel type&quot;).</p>\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"subscribe\",\n\t\t\t\t\t\t\t\t\t\"channelType\": \"orderbook\",\n\t\t\t\t\t\t\t\t\t\"symbol\":\"&lt;symbol&gt;\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t\t<h2>User Subscription (not yet implemented)</h2>\n\t\t\t\t\t\t\t<p>Reserved for future use &mdash; subscribing currently returns an <code>error</code> response (&quot;Unknown channel type&quot;).</p>\n\t\t\t\t\t\t\t<code>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"type\": \"subscribe\",\n\t\t\t\t\t\t\t\t\t\"channelType\": \"user\",\n\t\t\t\t\t\t\t\t\t\"accountId\": \"&lt;accountId&gt;\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</code>\n\t\t\t\t\t\t</div>","responses":{"101":{"description":"Websocket subscription. Every message has a `type`; for `init` and `update`/`create` messages the payload also depends on `channelType` (except the candle channel's create/update, which omits `channelType`/`channel` entirely).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WsSubscriptionAck"},{"$ref":"#/components/schemas/WsError"},{"$ref":"#/components/schemas/WsCandleInitMessage"},{"$ref":"#/components/schemas/WsCandleUpdateMessage"},{"$ref":"#/components/schemas/WsMarketsInitMessage"},{"$ref":"#/components/schemas/WsMarketsUpdateMessage"},{"$ref":"#/components/schemas/WsPricingInitMessage"},{"$ref":"#/components/schemas/WsPricingUpdateMessage"},{"$ref":"#/components/schemas/WsNotificationsUpdateMessage"}]}}}}}}},"/amm/position":{"get":{"tags":["AMM"],"description":"Fetch the AMM's position (inventory) over a specified time period.","parameters":[{"name":"marketName","in":"query","required":true,"schema":{"type":"string","example":"SOL-PERP"},"description":"The name of the market to get position data for (e.g., SOL-PERP)"},{"name":"start","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Start timestamp in seconds (must be less than end timestamp)"},{"name":"end","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"End timestamp in seconds (must be greater than start timestamp)"},{"name":"samples","in":"query","required":false,"schema":{"type":"integer","default":11000,"maximum":11000},"description":"Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000."}],"responses":{"200":{"description":"AMM position data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"array","items":{"oneOf":[{"type":"integer","description":"Timestamp in seconds"},{"type":"string","description":"Position value, in the market's base units"}]}}}},"example":{"success":true,"data":[[1744173151,"7512.174273741"],[1744777951,"-2396.800914929"]]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false}}}}}}}}},"/amm/bidAskPrice":{"get":{"tags":["AMM"],"description":"Fetch the AMM's bid and ask prices over a specified time period.","parameters":[{"name":"marketName","in":"query","required":true,"schema":{"type":"string","example":"SOL-PERP"},"description":"The name of the market to get bid-ask price data for (e.g., SOL-PERP)"},{"name":"start","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Start timestamp in seconds (must be less than end timestamp)"},{"name":"end","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"End timestamp in seconds (must be greater than start timestamp)"},{"name":"samples","in":"query","required":false,"schema":{"type":"integer","default":11000,"maximum":11000},"description":"Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000."}],"responses":{"200":{"description":"AMM bid-ask price data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"array","items":{"oneOf":[{"type":"integer","description":"Timestamp in seconds"},{"type":"string","description":"Bid price"},{"type":"string","description":"Ask price"}]}}}},"example":{"success":true,"data":[[1744173151,"121.54","122.87"],[1744777951,"123.45","124.56"]]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false}}}}}}}}},"/amm/oraclePrice":{"get":{"tags":["AMM"],"description":"Fetch the oracle price data for a market over a specified time period.","parameters":[{"name":"marketName","in":"query","required":true,"schema":{"type":"string","example":"SOL-PERP"},"description":"The name of the market to get oracle price data for (e.g., SOL-PERP)"},{"name":"start","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Start timestamp in seconds (must be less than end timestamp)"},{"name":"end","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"End timestamp in seconds (must be greater than start timestamp)"},{"name":"samples","in":"query","required":false,"schema":{"type":"integer","default":11000,"maximum":11000},"description":"Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000."}],"responses":{"200":{"description":"Oracle price data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"array","items":{"oneOf":[{"type":"integer","description":"Timestamp in seconds"},{"type":"string","description":"Oracle price"}]}}}},"example":{"success":true,"data":[[1744173151,"122.15"],[1744777951,"123.98"]]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false}}}}}}}}},"/amm/spreads":{"get":{"tags":["AMM"],"description":"Fetch the long and short spread data for an AMM over a specified time period.","parameters":[{"name":"marketName","in":"query","required":true,"schema":{"type":"string","example":"SOL-PERP"},"description":"The name of the market to get spread data for (e.g., SOL-PERP)"},{"name":"start","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Start timestamp in seconds (must be less than end timestamp)"},{"name":"end","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"End timestamp in seconds (must be greater than start timestamp)"},{"name":"samples","in":"query","required":false,"schema":{"type":"integer","default":11000,"maximum":11000},"description":"Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000."}],"responses":{"200":{"description":"AMM spread data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"array","items":{"oneOf":[{"type":"integer","description":"Timestamp in seconds"},{"type":"string","description":"Long spread, in percentage"},{"type":"string","description":"Short spread, in percentage"}]}}}},"example":{"success":true,"data":[[1744173151,"0.05","0.06"],[1744777951,"0.04","0.05"]]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false}}}}}}}}},"/amm/openInterest":{"get":{"tags":["AMM"],"description":"Fetch the open interest data for a market over a specified time period.","parameters":[{"name":"marketName","in":"query","required":true,"schema":{"type":"string","example":"SOL-PERP"},"description":"The name of the market to get open interest data for (e.g., SOL-PERP)"},{"name":"start","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"Start timestamp in seconds (must be less than end timestamp)"},{"name":"end","in":"query","required":true,"schema":{"type":"integer","format":"int64"},"description":"End timestamp in seconds (must be greater than start timestamp)"},{"name":"samples","in":"query","required":false,"schema":{"type":"integer","default":11000,"maximum":11000},"description":"Number of data points to return. The API will automatically calculate the appropriate step size between points. Maximum value is 11,000."}],"responses":{"200":{"description":"Open interest data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"array","items":{"oneOf":[{"type":"integer","description":"Timestamp in seconds"},{"type":"string","description":"Open interest value, in the market's base units"}]}}}},"example":{"success":true,"data":[[1744173151,"1250000.45"],[1744777951,"1345721.87"]]}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false}}}}}}}}},"/authority/{authorityId}/insuranceFundStake":{"get":{"tags":["Authority"],"description":"<p>\n\t\t\t\t\t\tRetrieve insurance fund stake records for a authority, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"userAuthority":{"type":"string"},"action":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"},"ifSharesBefore":{"type":"string"},"ifSharesAfter":{"type":"string"},"userIfSharesBefore":{"type":"string"},"userIfSharesAfter":{"type":"string"},"totalIfSharesBefore":{"type":"string"},"totalIfSharesAfter":{"type":"string"},"insuranceVaultAmountBefore":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","userAuthority","action","marketIndex","ifSharesBefore","userIfSharesBefore","totalIfSharesBefore","ifSharesAfter","userIfSharesAfter","totalIfSharesAfter","insuranceVaultAmountBefore"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/authority/{authorityId}/insuranceFundStake/{year}/{month}":{"get":{"tags":["Authority"],"description":"<p>Retrieve insurance fund stake records for a authority for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"userAuthority":{"type":"string"},"action":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"},"ifSharesBefore":{"type":"string"},"ifSharesAfter":{"type":"string"},"userIfSharesBefore":{"type":"string"},"userIfSharesAfter":{"type":"string"},"totalIfSharesBefore":{"type":"string"},"totalIfSharesAfter":{"type":"string"},"insuranceVaultAmountBefore":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","userAuthority","action","marketIndex","ifSharesBefore","userIfSharesBefore","totalIfSharesBefore","ifSharesAfter","userIfSharesAfter","totalIfSharesAfter","insuranceVaultAmountBefore"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/authority/{authorityId}/lpMintRedeem":{"get":{"tags":["Authority"],"description":"<p>\n\t\t\t\t\t\tRetrieve LP mint/redeem records for an authority, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"authority":{"type":"string"},"amount":{"type":"string"},"fee":{"type":"string"},"spotMarketIndex":{"type":"integer"},"oraclePrice":{"type":"string"},"mint":{"type":"string"},"lpAmount":{"type":"string"},"lpFee":{"type":"string"},"lpPrice":{"type":"string"},"description":{"type":"integer"},"constituentIndex":{"type":"integer"},"mintRedeemId":{"type":"string"},"lastAum":{"type":"string"},"lastAumSlot":{"type":"integer"},"inMarketCurrentWeight":{"type":"string"},"inMarketTargetWeight":{"type":"string"},"lpPool":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","authority","amount","fee","spotMarketIndex","oraclePrice","mint","lpAmount","lpFee","lpPrice","description","constituentIndex","mintRedeemId","lastAum","lastAumSlot","inMarketCurrentWeight","inMarketTargetWeight","lpPool"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/authority/{authorityId}/lpMintRedeem/{year}/{month}":{"get":{"tags":["Authority"],"description":"<p>Retrieve LP mint/redeem records for an authority for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"authority":{"type":"string"},"amount":{"type":"string"},"fee":{"type":"string"},"spotMarketIndex":{"type":"integer"},"oraclePrice":{"type":"string"},"mint":{"type":"string"},"lpAmount":{"type":"string"},"lpFee":{"type":"string"},"lpPrice":{"type":"string"},"description":{"type":"integer"},"constituentIndex":{"type":"integer"},"mintRedeemId":{"type":"string"},"lastAum":{"type":"string"},"lastAumSlot":{"type":"integer"},"inMarketCurrentWeight":{"type":"string"},"inMarketTargetWeight":{"type":"string"},"lpPool":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","authority","amount","fee","spotMarketIndex","oraclePrice","mint","lpAmount","lpFee","lpPrice","description","constituentIndex","mintRedeemId","lastAum","lastAumSlot","inMarketCurrentWeight","inMarketTargetWeight","lpPool"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/authority/{authorityId}/exports":{"post":{"tags":["Authority"],"description":"<p>Submit a request to build a CSV statement for the given authority. The job is enqueued and processed asynchronously; poll <code>GET</code> on the same path to retrieve readiness and a presigned download URL.</p>","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["fileType","from","to","userPublicKeys"],"additionalProperties":false,"properties":{"fileType":{"type":"string","enum":["trades","market-trades","funding-rates","funding-payments","deposits","liquidations","settle-pnl-records","lp-records","if-stake-records","swap-records","rewards"]},"from":{"type":"integer","minimum":0},"to":{"type":"integer","minimum":0},"userPublicKeys":{"type":"array","items":{"type":"string"},"minItems":1},"market":{"type":"string","nullable":true}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"requestId":{"type":"string"},"status":{"type":"string"}}}}}}}},"get":{"tags":["Authority"],"description":"<p>List export jobs for the given authority, newest first, 20 per page. Ready jobs include an 8 hour presigned <code>downloadUrl</code>. Use the <code>page</code> token from <code>meta.nextPage</code> to fetch subsequent pages.</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string"},"status":{"type":"string"},"fileType":{"type":"string"},"from":{"type":"integer"},"to":{"type":"integer"},"userPublicKeys":{"type":"array","items":{"type":"string"}},"market":{"type":"string","nullable":true},"createdAt":{"type":"integer"},"completedAt":{"type":"integer","nullable":true},"recordCount":{"type":"integer","nullable":true},"errorReason":{"type":"string","nullable":true},"downloadUrl":{"type":"string","nullable":true}}}},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/authority/{authorityId}/snapshots/overview":{"get":{"tags":["Authority"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"products":{"type":"object","properties":{"trade":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"accountBalance":{"type":"string"},"unrealizedPnl":{"type":"string"},"cumulativeRealizedPnl":{"type":"string"},"unsettledPnl":{"type":"string"},"cumulativeSettledPnl":{"type":"string"},"cumulativeFunding":{"type":"string"},"cumulativeFeePaid":{"type":"string"},"cumulativeFeeRebate":{"type":"string"},"cumulativeTakerVolume":{"type":"string"},"cumulativeMakerVolume":{"type":"string"}}}},"metrics":{"type":"object","nullable":true,"properties":{"cumulativeRealizedPnl":{"type":"string"},"cumulativeMakerVolume":{"type":"string"},"cumulativeTakerVolume":{"type":"string"},"cumulativeFeePaid":{"type":"string"},"cumulativeFeeRebate":{"type":"string"}}}}}},"earn":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"assets":{"type":"array","items":{"type":"object","properties":{"marketIndex":{"type":"number"},"balance":{"type":"string"},"deposits":{"type":"string"},"rewards":{"type":"string"},"withdrawals":{"type":"string"},"pnl":{"type":"string"},"interestBaseValue":{"type":"string"},"interestQuoteValue":{"type":"string"},"oraclePrice":{"type":"string"}},"required":["marketIndex","balance","deposits","withdrawals","pnl","interestBaseValue","interestQuoteValue","oraclePrice"]}}},"required":["ts","assets"]}}}}},"vaults":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"vault":{"type":"string"},"totalAccountValue":{"type":"string"},"totalAccountBaseValue":{"type":"string"},"netDeposits":{"type":"string"},"marketIndex":{"type":"number"}},"required":["ts","vault","totalAccountValue","totalAccountBaseValue","marketIndex"]}}}}}}}}}}}}}}},"/authority/{authorityId}/snapshots/trading":{"get":{"tags":["Authority"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"accountBalance":{"type":"string"},"unrealizedPnl":{"type":"string"},"cumulativeRealizedPnl":{"type":"string"},"unsettledPnl":{"type":"string"},"cumulativeSettledPnl":{"type":"string"},"cumulativeFunding":{"type":"string"},"cumulativeFeePaid":{"type":"string"},"cumulativeFeeRebate":{"type":"string"},"cumulativeTakerVolume":{"type":"string"},"cumulativeMakerVolume":{"type":"string"}}}},"metrics":{"type":"object","nullable":true,"properties":{"cumulativeRealizedPnl":{"type":"string"},"cumulativeMakerVolume":{"type":"string"},"cumulativeTakerVolume":{"type":"string"},"cumulativeFeePaid":{"type":"string"},"cumulativeFeeRebate":{"type":"string"}}}}}}}}}}}}}},"/authority/{authorityId}/snapshots/earn":{"get":{"tags":["Authority"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"assets":{"type":"array","items":{"type":"object","properties":{"marketIndex":{"type":"number"},"balance":{"type":"string"},"deposits":{"type":"string"},"rewards":{"type":"string"},"withdrawals":{"type":"string"},"pnl":{"type":"string"},"interestBaseValue":{"type":"string"},"interestQuoteValue":{"type":"string"},"oraclePrice":{"type":"string"}},"required":["marketIndex","balance","deposits","withdrawals","pnl","interestBaseValue","interestQuoteValue","oraclePrice"]}}},"required":["ts","assets"]}}}}}}}}}}}}},"/authority/{authorityId}/snapshots/vaults":{"get":{"tags":["Authority"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"vault":{"type":"string"},"totalAccountValue":{"type":"string"},"totalAccountBaseValue":{"type":"string"},"netDeposits":{"type":"string"},"marketIndex":{"type":"number"}},"required":["ts","vault","totalAccountValue","totalAccountBaseValue","marketIndex"]}}}}}}}}}}}}},"/authority/{authorityId}/snapshots/referrals":{"get":{"tags":["Authority"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"referralRewards":{"type":"string"},"referralCount":{"type":"string"},"referredUsers":{"type":"array","items":{"type":"string"}},"referredVolume30D":{"type":"string"}}}}}}}}}}}},"/authority/{authorityId}/accounts":{"get":{"tags":["Authority"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Retrieve the Velocity user accounts for a given wallet.","parameters":[{"schema":{"type":"string"},"in":"path","name":"authorityId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"builderRevenueShareAccount":{"type":"object","nullable":true,"properties":{"accountId":{"type":"string"},"totalBuilderRewards":{"type":"string"}}},"revenueShareEscrow":{"type":"object","nullable":true,"properties":{"accountId":{"type":"string"},"approvedBuilders":{"type":"array","items":{"type":"object","properties":{"authority":{"type":"string"},"maxFeeTenthBps":{"type":"number"}}}}}},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"subAccountId":{"type":"number"},"name":{"type":"string"}}}}}}}}}}}},"/external/coingecko/contracts":{"get":{"tags":["External"],"description":"Retrieve CoinGecko-compatible derivative contract metadata for Velocity perpetual markets.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"contracts":{"type":"array","items":{"type":"object","properties":{"contract_index":{"type":"number"},"ticker_id":{"type":"string"},"base_currency":{"type":"string"},"quote_currency":{"type":"string"},"last_price":{"type":"string"},"base_volume":{"type":"string"},"quote_volume":{"type":"string"},"high":{"type":"string"},"low":{"type":"string"},"product_type":{"type":"string"},"open_interest":{"type":"string"},"open_interest_usd":{"type":"string"},"index_price":{"type":"string"},"index_name":{"type":"string"},"index_currency":{"type":"string"},"funding_rate":{"type":"string"},"next_funding_rate":{"type":"string"},"next_funding_rate_timestamp":{"type":"string"},"contract_type":{"type":"string"},"contract_price_currency":{"type":"string"}}}}}}}}}}}},"/market/{symbol}/trades":{"get":{"tags":["Market"],"description":"<p>\n\t\t\t\t\t\tRetrieve trades records for a market, with optional pagination. Results are ordered from newest to oldest, with up to 50 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"number","minimum":1,"maximum":50,"default":20},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/trades/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve trade records for a market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/market/{symbol}/predictions":{"get":{"tags":["Market"],"description":"<p>\n\t\t\t\t\t\t\tRetrieve predictions records for a BET market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/predictions/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve predictions records for a BET market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/market/{symbol}/candles/{resolution}":{"get":{"tags":["Market"],"description":"<p>Retrieve OHLC records for a market and resolution.</p>","parameters":[{"schema":{"type":"number","minimum":1668470400},"in":"query","name":"endTs","required":false,"description":"End timestamp in seconds (must be >= 2020-01-01)"},{"schema":{"type":"number","minimum":1668470400},"in":"query","name":"startTs","required":false,"description":"Start timestamp in seconds (must be <= current time)"},{"schema":{"type":"number","minimum":1,"maximum":1000,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"string","enum":["1","5","15","60","240","D","W","M"]},"in":"path","name":"resolution","required":true,"description":"Candle resolution"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"fillOpen":{"type":"number"},"fillHigh":{"type":"number"},"fillClose":{"type":"number"},"fillLow":{"type":"number"},"oracleOpen":{"type":"number"},"oracleHigh":{"type":"number"},"oracleClose":{"type":"number"},"oracleLow":{"type":"number"},"quoteVolume":{"type":"number"},"baseVolume":{"type":"number"}},"required":["ts","fillOpen","fillHigh","fillClose","fillLow","oracleOpen","oracleHigh","oracleClose","oracleLow","quoteVolume","baseVolume"]},"maxItems":1000}}}}}}}}},"/market/{symbol}/fundingRates":{"get":{"tags":["Market"],"description":"<p>\n\t            Retrieve funding rates for a perp market, with optional pagination. Results are ordered from newest to oldest.\n\t        </p>\n\t        <p>\n\t            <strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t        </p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"number","minimum":1,"maximum":750,"default":20},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"recordId":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"},"fundingRate":{"type":"string"},"fundingRateLong":{"type":"string"},"fundingRateShort":{"type":"string"},"cumulativeFundingRateLong":{"type":"string"},"cumulativeFundingRateShort":{"type":"string"},"oraclePriceTwap":{"type":"string"},"markPriceTwap":{"type":"string"},"periodRevenue":{"type":"string"},"baseAssetAmountWithAmm":{"type":"string"},"baseAssetAmountWithUnsettledLp":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","recordId","marketIndex","symbol","fundingRate","fundingRateLong","fundingRateShort","cumulativeFundingRateLong","cumulativeFundingRateShort","oraclePriceTwap","markPriceTwap","periodRevenue","baseAssetAmountWithAmm","baseAssetAmountWithUnsettledLp"],"title":"FundingRateRecord"},"maxItems":750},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/fundingRates/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve funding rates for a perp market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"recordId":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"},"fundingRate":{"type":"string"},"fundingRateLong":{"type":"string"},"fundingRateShort":{"type":"string"},"cumulativeFundingRateLong":{"type":"string"},"cumulativeFundingRateShort":{"type":"string"},"oraclePriceTwap":{"type":"string"},"markPriceTwap":{"type":"string"},"periodRevenue":{"type":"string"},"baseAssetAmountWithAmm":{"type":"string"},"baseAssetAmountWithUnsettledLp":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","recordId","marketIndex","symbol","fundingRate","fundingRateLong","fundingRateShort","cumulativeFundingRateLong","cumulativeFundingRateShort","oraclePriceTwap","markPriceTwap","periodRevenue","baseAssetAmountWithAmm","baseAssetAmountWithUnsettledLp"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/market/{symbol}/insuranceFund":{"get":{"tags":["Market"],"description":"<p>\n\t\t\t\t\t\tRetrieve insurance fund records for a spot market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"spotMarketIndex":{"type":"integer"},"perpMarketIndex":{"type":"integer"},"userIfFactor":{"type":"number"},"totalIfFactor":{"type":"number"},"symbol":{"type":"string"},"vaultAmountBefore":{"type":"string"},"insuranceVaultAmountBefore":{"type":"string"},"totalIfSharesBefore":{"type":"string"},"totalIfSharesAfter":{"type":"string"},"amount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","spotMarketIndex","perpMarketIndex","userIfFactor","totalIfFactor","symbol","vaultAmountBefore","insuranceVaultAmountBefore","totalIfSharesBefore","totalIfSharesAfter","amount"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/insuranceFund/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve insurance fund records for a spot market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"spotMarketIndex":{"type":"integer"},"perpMarketIndex":{"type":"integer"},"userIfFactor":{"type":"number"},"totalIfFactor":{"type":"number"},"symbol":{"type":"string"},"vaultAmountBefore":{"type":"string"},"insuranceVaultAmountBefore":{"type":"string"},"totalIfSharesBefore":{"type":"string"},"totalIfSharesAfter":{"type":"string"},"amount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","spotMarketIndex","perpMarketIndex","userIfFactor","totalIfFactor","symbol","vaultAmountBefore","insuranceVaultAmountBefore","totalIfSharesBefore","totalIfSharesAfter","amount"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/market/{symbol}/swaps":{"get":{"tags":["Market"],"description":"<p>\n\t\t\t\t\t\tRetrieve swap records for a market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"txSig":{"type":"string"},"txSigIndex":{"type":"number"},"slot":{"type":"number"},"user":{"type":"string"},"outMarketIndex":{"type":"number"},"inMarketIndex":{"type":"number"},"outSymbol":{"type":"string"},"inSymbol":{"type":"string"},"isInMarket":{"type":"boolean"},"amountOut":{"type":"string"},"amountIn":{"type":"string"},"outOraclePrice":{"type":"string"},"inOraclePrice":{"type":"string"},"fee":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","user","amountOut","amountIn","outMarketIndex","inMarketIndex","outOraclePrice","inOraclePrice","fee"],"additionalProperties":false},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/swaps/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve swap records for a market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"txSig":{"type":"string"},"txSigIndex":{"type":"number"},"slot":{"type":"number"},"user":{"type":"string"},"outMarketIndex":{"type":"number"},"inMarketIndex":{"type":"number"},"outSymbol":{"type":"string"},"inSymbol":{"type":"string"},"isInMarket":{"type":"boolean"},"amountOut":{"type":"string"},"amountIn":{"type":"string"},"outOraclePrice":{"type":"string"},"inOraclePrice":{"type":"string"},"fee":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","user","amountOut","amountIn","outMarketIndex","inMarketIndex","outOraclePrice","inOraclePrice","fee"],"additionalProperties":false},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/market/{symbol}/deposits":{"get":{"tags":["Market"],"description":"<p>\n\t\t\t\t\t\tRetrieve deposit records for a market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/deposits/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve deposit records for a market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/market/{symbol}/rewards":{"get":{"tags":["Market"],"description":"<p>\n\t\t\t\t\t\tRetrieve reward records for a market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/rewards/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve reward records for a market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/market/{symbol}/insuranceFundStake":{"get":{"tags":["Market"],"description":"<p>\n\t\t\t\t\t\tRetrieve insurance fund stake records for a market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"userAuthority":{"type":"string"},"action":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"},"ifSharesBefore":{"type":"string"},"ifSharesAfter":{"type":"string"},"userIfSharesBefore":{"type":"string"},"userIfSharesAfter":{"type":"string"},"totalIfSharesBefore":{"type":"string"},"totalIfSharesAfter":{"type":"string"},"insuranceVaultAmountBefore":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","userAuthority","action","marketIndex","ifSharesBefore","userIfSharesBefore","totalIfSharesBefore","ifSharesAfter","userIfSharesAfter","totalIfSharesAfter","insuranceVaultAmountBefore"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/market/{symbol}/insuranceFundStake/{year}/{month}/{day}":{"get":{"tags":["Market"],"description":"<p>Retrieve insurance fund stake records for a market for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"},{"schema":{"type":"integer","minimum":1,"maximum":31},"in":"path","name":"day","required":true,"description":"Day from 1 to 31"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"userAuthority":{"type":"string"},"action":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"},"ifSharesBefore":{"type":"string"},"ifSharesAfter":{"type":"string"},"userIfSharesBefore":{"type":"string"},"userIfSharesAfter":{"type":"string"},"totalIfSharesBefore":{"type":"string"},"totalIfSharesAfter":{"type":"string"},"insuranceVaultAmountBefore":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","userAuthority","action","marketIndex","ifSharesBefore","userIfSharesBefore","totalIfSharesBefore","ifSharesAfter","userIfSharesAfter","totalIfSharesAfter","insuranceVaultAmountBefore"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/notifications":{"get":{"tags":["Notifications"],"description":"Get notifications for a user with optional filtering and pagination","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string","enum":["PENDING","SENT","FAILED","READ"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"header","name":"x-wallet-address","required":true,"description":"Solana wallet address"},{"schema":{"type":"string"},"in":"header","name":"x-signature","required":true,"description":"Signed message signature"},{"schema":{"type":"string"},"in":"header","name":"x-signed-message","required":true,"description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"notificationId":{"type":"string"},"authorityId":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"type":{"type":"string","enum":["PRICE_ALERT","RECORD_UPDATE","ACCOUNT_UPDATE","TEST","NEW_MARKET","PRODUCT_UPDATE","ANNOUNCEMENT","REDUCE_ONLY","CUSTOM"]},"status":{"type":"string","enum":["PENDING","SENT","FAILED","READ"]},"channels":{"type":"array","items":{"type":"string","enum":["app","push"]},"minItems":1,"uniqueItems":true},"data":{"type":"object","additionalProperties":true},"sentAt":{"type":"number"},"createdAt":{"type":"number"}},"required":["notificationId","authorityId","title","body","type","status"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/notifications/{notificationId}/read":{"put":{"tags":["Notifications"],"description":"Update notification status (e.g., mark as read)","parameters":[{"schema":{"type":"string"},"in":"path","name":"notificationId","required":true},{"schema":{"type":"string"},"in":"header","name":"x-wallet-address","required":true,"description":"Solana wallet address"},{"schema":{"type":"string"},"in":"header","name":"x-signature","required":true,"description":"Signed message signature"},{"schema":{"type":"string"},"in":"header","name":"x-signed-message","required":true,"description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/notifications/preferences":{"get":{"tags":["Notifications"],"description":"Get notification preferences for an account","parameters":[{"schema":{"type":"string"},"in":"header","name":"x-wallet-address","required":true,"description":"Solana wallet address"},{"schema":{"type":"string"},"in":"header","name":"x-signature","required":true,"description":"Signed message signature"},{"schema":{"type":"string"},"in":"header","name":"x-signed-message","required":true,"description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"preferences":{"type":"object","properties":{"authorityId":{"type":"string"},"pushOptOutTypes":{"type":"array","items":{"type":"string","enum":["PRICE_ALERT","RECORD_UPDATE","ACCOUNT_UPDATE","TEST","NEW_MARKET","PRODUCT_UPDATE","ANNOUNCEMENT","REDUCE_ONLY","CUSTOM"]},"uniqueItems":true}},"required":["authorityId","pushOptOutTypes"],"additionalProperties":false}}}}}}}},"put":{"tags":["Notifications"],"description":"Update notification preferences for an account","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pushOptOutTypes":{"type":"array","items":{"type":"string","enum":["PRICE_ALERT","RECORD_UPDATE","ACCOUNT_UPDATE","TEST","NEW_MARKET","PRODUCT_UPDATE","ANNOUNCEMENT","REDUCE_ONLY","CUSTOM"]},"uniqueItems":true}},"required":["pushOptOutTypes"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-wallet-address","required":true,"description":"Solana wallet address"},{"schema":{"type":"string"},"in":"header","name":"x-signature","required":true,"description":"Signed message signature"},{"schema":{"type":"string"},"in":"header","name":"x-signed-message","required":true,"description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"preferences":{"type":"object","properties":{"authorityId":{"type":"string"},"pushOptOutTypes":{"type":"array","items":{"type":"string","enum":["PRICE_ALERT","RECORD_UPDATE","ACCOUNT_UPDATE","TEST","NEW_MARKET","PRODUCT_UPDATE","ANNOUNCEMENT","REDUCE_ONLY","CUSTOM"]},"uniqueItems":true}},"required":["authorityId","pushOptOutTypes"],"additionalProperties":false}}}}}}}}},"/notifications/devices":{"post":{"tags":["Notifications"],"description":"Register or update a device for push notifications","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deviceId":{"type":"string"},"token":{"type":"string"},"platform":{"type":"string","enum":["ios","android","web"]}},"required":["deviceId"]}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"header","name":"x-wallet-address","required":true,"description":"Solana wallet address"},{"schema":{"type":"string"},"in":"header","name":"x-signature","required":true,"description":"Signed message signature"},{"schema":{"type":"string"},"in":"header","name":"x-signed-message","required":true,"description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"device":{"type":"object","properties":{"deviceId":{"type":"string"},"token":{"type":"string"},"platform":{"type":"string","enum":["ios","android","web"]}},"required":["deviceId"]}}}}}}}},"get":{"tags":["Notifications"],"description":"Get all registered devices for an account","parameters":[{"schema":{"type":"string"},"in":"header","name":"x-wallet-address","required":true,"description":"Solana wallet address"},{"schema":{"type":"string"},"in":"header","name":"x-signature","required":true,"description":"Signed message signature"},{"schema":{"type":"string"},"in":"header","name":"x-signed-message","required":true,"description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"devices":{"type":"array","items":{"type":"object","properties":{"deviceId":{"type":"string"},"token":{"type":"string"},"platform":{"type":"string","enum":["ios","android","web"]}},"required":["deviceId"]}}}}}}}}}},"/notifications/devices/{deviceId}":{"delete":{"tags":["Notifications"],"description":"Delete a device registration","parameters":[{"schema":{"type":"string"},"in":"path","name":"deviceId","required":true},{"schema":{"type":"string"},"in":"header","name":"x-wallet-address","required":true,"description":"Solana wallet address"},{"schema":{"type":"string"},"in":"header","name":"x-signature","required":true,"description":"Signed message signature"},{"schema":{"type":"string"},"in":"header","name":"x-signed-message","required":true,"description":"JSON string containing timestamp and action. Format: {\"action\": \"string\", \"ts\": \"Unix timestamp (seconds)\", \"walletAddress\": \"string\", \"isDelegate\"?: boolean, \"velocityUserAccount\"?: \"string\"}"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/params":{"get":{"tags":["Public"],"description":"Public read of the dashboard params blob. Used by the trading UI; 1-min CloudFront cache.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"params":{"type":"object","additionalProperties":true},"updatedAt":{"type":"number"}}}}}}}}},"/stats/liquidations":{"get":{"tags":["Stats"],"description":"<p>\n\t\t\t\t\tRetrieve liquidations records, with optional pagination. Results are ordered from newest to oldest, with up to 20 unique liquidations per request.\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t</p>","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"stats":{"24h":{"properties":{"count":{"type":"string"},"amount":{"type":"string"}}},"30d":{"properties":{"count":{"type":"string"},"amount":{"type":"string"}}}},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"liquidationType":{"type":"string"},"user":{"type":"string"},"liquidator":{"type":"string"},"marginRequirement":{"type":"string"},"totalCollateral":{"type":"string"},"marginFreed":{"type":"string"},"liquidationId":{"type":"string"},"bankrupt":{"type":"boolean"},"canceledOrderIds":{"type":"array","items":{"type":"string"}},"liquidatePerp_marketIndex":{"type":"integer"},"liquidatePerp_oraclePrice":{"type":"string"},"liquidatePerp_baseAssetAmount":{"type":"string"},"liquidatePerp_quoteAssetAmount":{"type":"string"},"liquidatePerp_lpShares":{"type":"string"},"liquidatePerp_fillRecordId":{"type":"string"},"liquidatePerp_userOrderId":{"type":"string"},"liquidatePerp_liquidatorOrderId":{"type":"string"},"liquidatePerp_liquidatorFee":{"type":"string"},"liquidatePerp_ifFee":{"type":"string"},"liquidateSpot_assetMarketIndex":{"type":"integer"},"liquidateSpot_assetPrice":{"type":"string"},"liquidateSpot_assetTransfer":{"type":"string"},"liquidateSpot_liabilityMarketIndex":{"type":"integer"},"liquidateSpot_liabilityPrice":{"type":"string"},"liquidateSpot_liabilityTransfer":{"type":"string"},"liquidateSpot_ifFee":{"type":"string"},"liquidateBorrowForPerpPnl_perpMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_marketOraclePrice":{"type":"string"},"liquidateBorrowForPerpPnl_pnlTransfer":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_liabilityPrice":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_perpMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_marketOraclePrice":{"type":"string"},"liquidatePerpPnlForDeposit_pnlTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_assetMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_assetPrice":{"type":"string"},"liquidatePerpPnlForDeposit_assetTransfer":{"type":"string"},"perpBankruptcy_marketIndex":{"type":"integer"},"perpBankruptcy_pnl":{"type":"string"},"perpBankruptcy_ifPayment":{"type":"string"},"perpBankruptcy_clawbackUser":{"type":"string"},"perpBankruptcy_clawbackUserPayment":{"type":"string"},"perpBankruptcy_cumulativeFundingRateDelta":{"type":"string"},"spotBankruptcy_marketIndex":{"type":"integer"},"spotBankruptcy_borrowAmount":{"type":"string"},"spotBankruptcy_ifPayment":{"type":"string"},"spotBankruptcy_cumulativeDepositInterestDelta":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","liquidationType","user","liquidator","marginRequirement","totalCollateral","marginFreed","liquidationId","bankrupt","canceledOrderIds","liquidatePerp_marketIndex","liquidatePerp_oraclePrice","liquidatePerp_baseAssetAmount","liquidatePerp_quoteAssetAmount","liquidatePerp_lpShares","liquidatePerp_fillRecordId","liquidatePerp_userOrderId","liquidatePerp_liquidatorOrderId","liquidatePerp_liquidatorFee","liquidatePerp_ifFee","liquidateSpot_assetMarketIndex","liquidateSpot_assetPrice","liquidateSpot_assetTransfer","liquidateSpot_liabilityMarketIndex","liquidateSpot_liabilityPrice","liquidateSpot_liabilityTransfer","liquidateSpot_ifFee","liquidateBorrowForPerpPnl_perpMarketIndex","liquidateBorrowForPerpPnl_marketOraclePrice","liquidateBorrowForPerpPnl_pnlTransfer","liquidateBorrowForPerpPnl_liabilityMarketIndex","liquidateBorrowForPerpPnl_liabilityPrice","liquidateBorrowForPerpPnl_liabilityTransfer","liquidatePerpPnlForDeposit_perpMarketIndex","liquidatePerpPnlForDeposit_marketOraclePrice","liquidatePerpPnlForDeposit_pnlTransfer","liquidatePerpPnlForDeposit_assetMarketIndex","liquidatePerpPnlForDeposit_assetPrice","liquidatePerpPnlForDeposit_assetTransfer","perpBankruptcy_marketIndex","perpBankruptcy_pnl","perpBankruptcy_ifPayment","perpBankruptcy_clawbackUser","perpBankruptcy_clawbackUserPayment","perpBankruptcy_cumulativeFundingRateDelta","spotBankruptcy_marketIndex","spotBankruptcy_borrowAmount","spotBankruptcy_ifPayment","spotBankruptcy_cumulativeDepositInterestDelta"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/stats/bankruptcies":{"get":{"tags":["Stats"],"description":"<p>\n\t\t\t\t\tRetrieve bankruptcy records, with optional pagination. Results are ordered from newest to oldest, with up to 20 unique bankruptcy per request.\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t</p>","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"stats":{"properties":{"totalAmount":{"type":"string"},"ifPayment":{"type":"string"},"socialLoss":{"type":"string"},"totalCount":{"type":"string"}},"type":"object"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"liquidationType":{"type":"string"},"user":{"type":"string"},"liquidator":{"type":"string"},"marginRequirement":{"type":"string"},"totalCollateral":{"type":"string"},"marginFreed":{"type":"string"},"liquidationId":{"type":"string"},"bankrupt":{"type":"boolean"},"canceledOrderIds":{"type":"array","items":{"type":"string"}},"liquidatePerp_marketIndex":{"type":"integer"},"liquidatePerp_oraclePrice":{"type":"string"},"liquidatePerp_baseAssetAmount":{"type":"string"},"liquidatePerp_quoteAssetAmount":{"type":"string"},"liquidatePerp_lpShares":{"type":"string"},"liquidatePerp_fillRecordId":{"type":"string"},"liquidatePerp_userOrderId":{"type":"string"},"liquidatePerp_liquidatorOrderId":{"type":"string"},"liquidatePerp_liquidatorFee":{"type":"string"},"liquidatePerp_ifFee":{"type":"string"},"liquidateSpot_assetMarketIndex":{"type":"integer"},"liquidateSpot_assetPrice":{"type":"string"},"liquidateSpot_assetTransfer":{"type":"string"},"liquidateSpot_liabilityMarketIndex":{"type":"integer"},"liquidateSpot_liabilityPrice":{"type":"string"},"liquidateSpot_liabilityTransfer":{"type":"string"},"liquidateSpot_ifFee":{"type":"string"},"liquidateBorrowForPerpPnl_perpMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_marketOraclePrice":{"type":"string"},"liquidateBorrowForPerpPnl_pnlTransfer":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_liabilityPrice":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_perpMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_marketOraclePrice":{"type":"string"},"liquidatePerpPnlForDeposit_pnlTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_assetMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_assetPrice":{"type":"string"},"liquidatePerpPnlForDeposit_assetTransfer":{"type":"string"},"perpBankruptcy_marketIndex":{"type":"integer"},"perpBankruptcy_pnl":{"type":"string"},"perpBankruptcy_ifPayment":{"type":"string"},"perpBankruptcy_clawbackUser":{"type":"string"},"perpBankruptcy_clawbackUserPayment":{"type":"string"},"perpBankruptcy_cumulativeFundingRateDelta":{"type":"string"},"spotBankruptcy_marketIndex":{"type":"integer"},"spotBankruptcy_borrowAmount":{"type":"string"},"spotBankruptcy_ifPayment":{"type":"string"},"spotBankruptcy_cumulativeDepositInterestDelta":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","liquidationType","user","liquidator","marginRequirement","totalCollateral","marginFreed","liquidationId","bankrupt","canceledOrderIds","liquidatePerp_marketIndex","liquidatePerp_oraclePrice","liquidatePerp_baseAssetAmount","liquidatePerp_quoteAssetAmount","liquidatePerp_lpShares","liquidatePerp_fillRecordId","liquidatePerp_userOrderId","liquidatePerp_liquidatorOrderId","liquidatePerp_liquidatorFee","liquidatePerp_ifFee","liquidateSpot_assetMarketIndex","liquidateSpot_assetPrice","liquidateSpot_assetTransfer","liquidateSpot_liabilityMarketIndex","liquidateSpot_liabilityPrice","liquidateSpot_liabilityTransfer","liquidateSpot_ifFee","liquidateBorrowForPerpPnl_perpMarketIndex","liquidateBorrowForPerpPnl_marketOraclePrice","liquidateBorrowForPerpPnl_pnlTransfer","liquidateBorrowForPerpPnl_liabilityMarketIndex","liquidateBorrowForPerpPnl_liabilityPrice","liquidateBorrowForPerpPnl_liabilityTransfer","liquidatePerpPnlForDeposit_perpMarketIndex","liquidatePerpPnlForDeposit_marketOraclePrice","liquidatePerpPnlForDeposit_pnlTransfer","liquidatePerpPnlForDeposit_assetMarketIndex","liquidatePerpPnlForDeposit_assetPrice","liquidatePerpPnlForDeposit_assetTransfer","perpBankruptcy_marketIndex","perpBankruptcy_pnl","perpBankruptcy_ifPayment","perpBankruptcy_clawbackUser","perpBankruptcy_clawbackUserPayment","perpBankruptcy_cumulativeFundingRateDelta","spotBankruptcy_marketIndex","spotBankruptcy_borrowAmount","spotBankruptcy_ifPayment","spotBankruptcy_cumulativeDepositInterestDelta"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/stats/vaults":{"get":{"tags":["Stats"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"vaults":{"type":"array","items":{"type":"object","properties":{"pubkey":{"type":"string"},"manager":{"type":"string"},"tokenAccount":{"type":"string"},"userStats":{"type":"string"},"user":{"type":"string"},"delegate":{"type":"string"},"liquidationDelegate":{"type":"string"},"userShares":{"type":"string"},"totalShares":{"type":"string"},"sharesBase":{"type":"string"},"lastFeeUpdateTs":{"type":"number"},"liquidationStartTs":{"type":"number"},"redeemPeriod":{"type":"number"},"initTs":{"type":"number"},"totalWithdrawRequested":{"type":"number"},"maxTokens":{"type":"string"},"netDeposits":{"type":"string"},"totalDeposits":{"type":"string"},"totalWithdraws":{"type":"string"},"managerNetDeposits":{"type":"string"},"managerTotalDeposits":{"type":"string"},"managerTotalWithdraws":{"type":"string"},"managerTotalFee":{"type":"string"},"managerTotalProfitShare":{"type":"string"},"lastManagerWithdrawRequest":{"type":"object","properties":{"shares":{"type":"string"},"value":{"type":"string"},"ts":{"type":"string"}},"required":["shares","value","ts"]},"minDepositAmount":{"type":"string"},"profitShare":{"type":"string"},"managementFee":{"type":"string"},"hurdleRate":{"type":"string"},"spotMarketIndex":{"type":"number"},"permissioned":{"type":"boolean"}},"required":["pubkey","manager","tokenAccount","userStats","user","delegate","liquidationDelegate","userShares","totalShares","sharesBase","lastFeeUpdateTs","liquidationStartTs","redeemPeriod","initTs","totalWithdrawRequested","maxTokens","netDeposits","totalDeposits","totalWithdraws","managerNetDeposits","managerTotalDeposits","managerTotalWithdraws","managerTotalFee","managerTotalProfitShare","lastManagerWithdrawRequest","minDepositAmount","profitShare","managementFee","hurdleRate","spotMarketIndex","permissioned"]}}}}}}}}}},"/stats/insuranceFundSwaps":{"get":{"tags":["Stats"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"inMarketIndex":{"type":"integer"},"outMarketIndex":{"type":"integer"},"inAmount":{"type":"string"},"outAmount":{"type":"string"},"inVaultAmountBefore":{"type":"string"},"outVaultAmountBefore":{"type":"string"},"inFundVaultAmountAfter":{"type":"string"},"outFundVaultAmountAfter":{"type":"string"},"inIfTotalSharesBefore":{"type":"string"},"outIfTotalSharesBefore":{"type":"string"},"inIfTotalSharesAfter":{"type":"string"},"outIfTotalSharesAfter":{"type":"string"},"inIfUserSharesBefore":{"type":"string"},"outIfUserSharesBefore":{"type":"string"},"inIfUserSharesAfter":{"type":"string"},"outIfUserSharesAfter":{"type":"string"},"outOraclePrice":{"type":"string"},"outOraclePriceTwap":{"type":"string"},"rebalanceConfig":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","inMarketIndex","outMarketIndex","inAmount","outAmount","inVaultAmountBefore","outVaultAmountBefore","inFundVaultAmountAfter","outFundVaultAmountAfter","inIfTotalSharesBefore","outIfTotalSharesBefore","inIfTotalSharesAfter","outIfTotalSharesAfter","inIfUserSharesBefore","outIfUserSharesBefore","inIfUserSharesAfter","outIfUserSharesAfter","outOraclePrice","outOraclePriceTwap","rebalanceConfig"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/stats/markets":{"get":{"tags":["Stats"],"description":"Get a summary of market data","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"markets":{"type":"array","items":{"properties":{"symbol":{"type":"string"},"marketIndex":{"type":"number"},"marketType":{"type":"string"},"uiStatus":{"type":"string","enum":["visible","hidden","scheduled_to_hide"]},"uiHideAtTs":{"type":"number"},"baseAsset":{"type":"string"},"quoteAsset":{"type":"string"},"status":{"type":"string"},"precision":{"type":"number"},"limits":{"type":"object","properties":{"leverage":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"amount":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"withdraw":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"deposit":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}}}},"fees":{"type":"object","properties":{"maker":{"type":"number"},"taker":{"type":"number"}}},"oraclePrice":{"type":"string"},"markPrice":{"type":"string"},"baseVolume":{"type":"string"},"quoteVolume":{"type":"string"},"deposits":{"type":"string"},"borrows":{"type":"string"},"openInterest":{"type":"object","properties":{"long":{"type":"string"},"short":{"type":"string"}}},"fundingRate":{"type":"object","properties":{"long":{"type":"string"},"short":{"type":"string"}}},"fundingRate24h":{"type":"string"},"fundingRateUpdateTs":{"type":"number"},"price":{"type":"string"},"priceChange24h":{"type":"string"},"priceChange24hPercent":{"type":"string"},"priceHigh":{"type":"object","properties":{"oracle":{"type":"string"},"fill":{"type":"string"}}},"priceLow":{"type":"object","properties":{"oracle":{"type":"string"},"fill":{"type":"string"}}}},"type":"object"}}}}}}}}}},"/stats/markets/volume/{interval}":{"get":{"tags":["Stats"],"description":"Get rolling market volume data for specified interval","parameters":[{"schema":{"type":"string","default":"24h","enum":["1h","24h","30d"]},"in":"path","name":"interval","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"total":{"type":"string"},"markets":{"type":"array","items":{"properties":{"symbol":{"type":"string"},"quoteVolume":{"type":"string"},"baseVolume":{"type":"string"},"marketIndex":{"type":"number"},"marketType":{"type":"string"}},"type":"object"}}}}}}}}}},"/stats/markets/volume":{"get":{"tags":["Stats"],"description":"Get historical market volume data bucketed into 1-hour intervals. Time range must be between 1 and 24 hours (rounded down to nearest hour).","parameters":[{"schema":{"type":"number"},"in":"query","name":"startTs","required":true,"description":"Start timestamp in seconds (Unix epoch)"},{"schema":{"type":"number"},"in":"query","name":"endTs","required":true,"description":"End timestamp in seconds (Unix epoch)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"total":{"type":"string"},"startTs":{"type":"number"},"endTs":{"type":"number"},"markets":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"baseVolume":{"type":"string"},"quoteVolume":{"type":"string"},"marketIndex":{"type":"number"},"marketType":{"type":"string"}}}}}}}}}}}},"/stats/markets/prices":{"get":{"tags":["Stats"],"description":"Get the 24-hour price change and percentage change for all markets.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"markets":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"currentPrice":{"type":"string"},"price24hAgo":{"type":"string"},"priceChange":{"type":"string"},"priceChangePercent":{"type":"string"},"marketIndex":{"type":"number"},"marketType":{"type":"string"}}}}}}}}}}}},"/stats/fundingRates":{"get":{"tags":["Stats"],"description":"Get average funding rates across multiple time periods for all markets","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"markets":{"type":"array","items":{"type":"object","properties":{"marketIndex":{"type":"number"},"symbol":{"type":"string"},"fundingRates":{"type":"object","properties":{"24h":{"type":"string"},"7d":{"type":"string"},"30d":{"type":"string"},"1y":{"type":"string"}}}}}}}}}}}}}},"/stats/externalFundingRates":{"get":{"tags":["Stats"],"description":"Get the latest funding rates from external exchanges (Binance, Hyperliquid, dYdX, Bybit) for all perp markets, for comparison against Velocity funding","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"markets":{"type":"array","items":{"type":"object","properties":{"marketIndex":{"type":"number"},"symbol":{"type":"string"},"externalFundingRates":{"type":"object","properties":{"binance":{"type":"number"},"hyperliquid":{"type":"number"},"dydx":{"type":"number"},"bybit":{"type":"number"}}}}}}}}}}}}}},"/stats/insuranceFund":{"get":{"tags":["Stats"],"description":"Get insurance fund revenue and market apy data","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"totalRevenue":{"type":"string"},"perpLiqsTotal":{"type":"string"},"spotLiqsTotal":{"type":"string"},"marketSharePriceData":{"type":"array","items":{"type":"object","properties":{"marketIndex":{"type":"number"},"symbol":{"type":"string"},"apy":{"type":"string","nullable":true}}}}}}}}}}}}}},"/stats/dlp/snapshots":{"get":{"tags":["Stats"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"price":{"type":"string"},"tvl":{"type":"string"}}}}}}}}}}}},"/stats/{symbol}/rateHistory/{type}":{"get":{"tags":["Stats"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"symbol","required":true},{"schema":{"type":"string","default":"deposit","enum":["deposit","borrow","deposit_balance","borrow_balance"]},"in":"path","name":"type","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"rates":{"type":"array","items":{"type":"array","items":{"oneOf":[{"type":"integer"},{"type":"string"}]}}}}}}}}}}},"/stats/leaderboard":{"get":{"tags":["Stats"],"description":"Get leaderboard entries with optional date and market filters.","parameters":[{"schema":{"type":"integer","minimum":1,"default":1},"in":"query","name":"page","required":false},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string","enum":["pnl","volume"],"default":"pnl"},"in":"query","name":"sort","required":false},{"schema":{"type":"string"},"in":"query","name":"start","required":false,"description":"UTC date string YYYY-MM-DD"},{"schema":{"type":"string"},"in":"query","name":"end","required":false,"description":"UTC date string YYYY-MM-DD"},{"schema":{"type":"string"},"in":"query","name":"symbol","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"leaderboard":{"type":"array","items":{"type":"object","properties":{"authority":{"type":"string"},"volume":{"type":"number"},"pnl":{"type":"number"},"rank":{"type":"integer"}}}}}}}}}}}}}},"/stats/leaderboard/{authority}":{"get":{"tags":["Stats"],"description":"Get leaderboard rank and stats for a specific user.","parameters":[{"schema":{"type":"string"},"in":"query","name":"start","required":false,"description":"UTC date string YYYY-MM-DD. Defaults to 7 Days prior"},{"schema":{"type":"string"},"in":"query","name":"end","required":false,"description":"UTC date string YYYY-MM-DD. Defaults to today"},{"schema":{"type":"string"},"in":"query","name":"symbol","required":false},{"schema":{"type":"string"},"in":"path","name":"authority","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"volume":{"type":"number","nullable":true},"pnl":{"type":"number","nullable":true},"rank":{"type":"object","properties":{"pnl":{"type":"number","nullable":true},"volume":{"type":"number","nullable":true}}}}}}}}}}}}},"/stats/maker-leaderboard":{"get":{"tags":["Stats"],"description":"Get the current-month maker volume leaderboard.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"leaderboard":{"type":"array","items":{"type":"object","properties":{"maker":{"type":"string"},"totalVolume":{"type":"number"},"count":{"type":"integer"},"percentVolume":{"type":"number"},"accounts":{"type":"array","items":{"type":"string"}},"markets":{"type":"array","items":{"type":"object","properties":{"market":{"type":"string"},"marketIndex":{"type":"string"},"marketType":{"type":"string"},"volume":{"type":"number"},"percentOfMarket":{"type":"number"},"percentOfMaker":{"type":"number"}}}}}}},"lastUpdated":{"type":"integer","nullable":true},"month":{"type":"string","nullable":true}}}}}}}}}}},"/stats/maker-leaderboard/{year}/{month}":{"get":{"tags":["Stats"],"description":"Get the maker volume leaderboard for a specific year and month.","parameters":[{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"leaderboard":{"type":"array","items":{"type":"object","properties":{"maker":{"type":"string"},"totalVolume":{"type":"number"},"count":{"type":"integer"},"percentVolume":{"type":"number"},"accounts":{"type":"array","items":{"type":"string"}},"markets":{"type":"array","items":{"type":"object","properties":{"market":{"type":"string"},"marketIndex":{"type":"string"},"marketType":{"type":"string"},"volume":{"type":"number"},"percentOfMarket":{"type":"number"},"percentOfMaker":{"type":"number"}}}}}}},"lastUpdated":{"type":"integer","nullable":true},"month":{"type":"string","nullable":true}}}}}}}}}}},"/stats/taker-leaderboard":{"get":{"tags":["Stats"],"description":"Get the current-month taker volume leaderboard.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"leaderboard":{"type":"array","items":{"type":"object","properties":{"taker":{"type":"string"},"totalVolume":{"type":"number"},"totalPnL":{"type":"number"},"count":{"type":"integer"},"percentVolume":{"type":"number"},"percentPnL":{"type":"number"},"accounts":{"type":"array","items":{"type":"string"}},"markets":{"type":"array","items":{"type":"object","properties":{"market":{"type":"string"},"marketIndex":{"type":"string"},"marketType":{"type":"string"},"volume":{"type":"number"},"pnl":{"type":"number"},"percentOfMarketVolume":{"type":"number"},"percentOfMarketPnL":{"type":"number"},"percentOfTakerVolume":{"type":"number"},"percentOfTakerPnL":{"type":"number"}}}}}}},"lastUpdated":{"type":"integer","nullable":true},"month":{"type":"string","nullable":true}}}}}}}}}}},"/stats/taker-leaderboard/{year}/{month}":{"get":{"tags":["Stats"],"description":"Get the taker volume leaderboard for a specific year and month.","parameters":[{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"leaderboard":{"type":"array","items":{"type":"object","properties":{"taker":{"type":"string"},"totalVolume":{"type":"number"},"totalPnL":{"type":"number"},"count":{"type":"integer"},"percentVolume":{"type":"number"},"percentPnL":{"type":"number"},"accounts":{"type":"array","items":{"type":"string"}},"markets":{"type":"array","items":{"type":"object","properties":{"market":{"type":"string"},"marketIndex":{"type":"string"},"marketType":{"type":"string"},"volume":{"type":"number"},"pnl":{"type":"number"},"percentOfMarketVolume":{"type":"number"},"percentOfMarketPnL":{"type":"number"},"percentOfTakerVolume":{"type":"number"},"percentOfTakerPnL":{"type":"number"}}}}}}},"lastUpdated":{"type":"integer","nullable":true},"month":{"type":"string","nullable":true}}}}}}}}}}},"/tx/deposit":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Build a transaction to deposit collateral into a Velocity account","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","description":"User wallet public key"},"amount":{"type":"string","description":"Amount to deposit in base units"},"symbol":{"type":"string","description":"Spot market symbol"},"simulate":{"type":"boolean","description":"Whether to simulate transaction before returning (default: true)","default":true}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tx":{"type":"string","description":"Base64 encoded transaction"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true},"message":{"type":"string"}}}}}}}}},"/tx/withdraw":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Build a transaction to withdraw collateral from a Velocity account","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","description":"User wallet public key"},"amount":{"type":"string","description":"Amount to withdraw in base units"},"symbol":{"type":"string","description":"Spot market symbol"},"simulate":{"type":"boolean","description":"Whether to simulate transaction before returning (default: true)","default":true}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tx":{"type":"string","description":"Base64 encoded transaction"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true},"message":{"type":"string"}}}}}}}}},"/tx/execute":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Send a signed transaction to be executed on chain. Optionally simulate before executing to catch errors early.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"signedTx":{"type":"string","description":"Base64 encoded signed transaction"},"simulate":{"type":"boolean","description":"Simulate transaction before executing to catch potential errors (default: true)","default":false}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"txSig":{"type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true}}}}}}}}},"/tx/order/place":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Build a transaction to place a perp order on Velocity","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["accountId","symbol","direction","amount","orderType"],"properties":{"accountId":{"type":"string"},"symbol":{"type":"string"},"direction":{"type":"string","enum":["long","short"],"description":"Order direction"},"amount":{"type":"string","description":"Base asset amount"},"orderType":{"type":"string","enum":["market","limit"],"description":"Order type"},"marginMode":{"type":"string","enum":["cross","isolated"],"description":"Position margin mode (cross or isolated)"},"price":{"type":"string","description":"Limit price (required for limit orders)"},"reduceOnly":{"type":"boolean","description":"Whether order is reduce-only"},"postOnly":{"type":"boolean","description":"Whether order is post-only (limit orders only)"},"useSwift":{"type":"boolean","description":"Whether to prepare a Swift order message instead of a transaction","default":false},"positionMaxLeverage":{"type":"number","description":"Total leverage to use"},"builderParams":{"type":"object","description":"Optional builder code params. Note: currently only applied in Velocity Swift order flow.","required":["builderIdx","builderFeeTenthBps"],"additionalProperties":false,"properties":{"builderIdx":{"type":"number","minimum":0,"description":"Index in the user approved builders list (RevenueShareEscrow)."},"builderFeeTenthBps":{"type":"number","minimum":1,"description":"Fee for this order in tenth-bps. Must be <= approved builder max."}}},"simulate":{"type":"boolean","description":"Whether to simulate transaction before returning (default: true)","default":true}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tx":{"type":"string","nullable":true,"description":"Base64 encoded transaction (non-Swift only)"},"swift":{"type":"object","nullable":true,"properties":{"payload":{"type":"object","properties":{"market_index":{"type":"number","description":"Swift server perp market index"},"market_type":{"type":"string","description":"Swift server market type"},"message":{"type":"string","description":"UTF-8 encoded hex string to sign and send to the Swift server"},"signature":{"type":"string","description":"Base64 wallet signature. This is returned empty and must be filled client-side before sending."},"signing_authority":{"type":"string","description":"Authority that signs the Swift order message"},"taker_authority":{"type":"string","description":"Taker authority expected by the Swift server"}}},"meta":{"type":"object","properties":{"signedMsgOrderUuid":{"type":"string","description":"Base64 encoded signed message order UUID for tracking"},"slotForSignedMsg":{"type":"string","description":"Slot encoded into the signed Swift order message"},"slotsTillAuctionEnd":{"type":"number"},"expirationTimeMs":{"type":"number"}}}}},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true},"message":{"type":"string","nullable":true}}}}}}}}},"/tx/order/cancel":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Build a transaction to cancel orders on Velocity. If orderIds is provided, cancels specific orders. Otherwise, cancels all orders.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["accountId"],"properties":{"accountId":{"type":"string","description":"User account public key (not authority)"},"orderIds":{"type":"array","items":{"type":"number"},"description":"Optional: Array of specific order IDs to cancel. If not provided, cancels all orders."},"simulate":{"type":"boolean","description":"Whether to simulate transaction before returning (default: true)","default":true}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tx":{"type":"string","description":"Base64 encoded transaction"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true},"message":{"type":"string","nullable":true}}}}}}}}},"/tx/builder/init":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Build a transaction for a builder to initialize their revenue share account","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["builderId"],"additionalProperties":false,"properties":{"builderId":{"type":"string","description":"Builder wallet public key"},"simulate":{"type":"boolean","description":"Whether to simulate transaction before returning (default: true)","default":true}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tx":{"type":"string","description":"Base64 encoded transaction"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true},"message":{"type":"string"}}}}}}}}},"/tx/builder/approve":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Build a single transaction to create a user's builder escrow and approve a builder","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["authorityId","builderId","maxFeeTenthBps"],"additionalProperties":false,"properties":{"authorityId":{"type":"string","description":"User authority wallet public key"},"builderId":{"type":"string","description":"Builder wallet public key"},"maxFeeTenthBps":{"type":"number","description":"Builder max fee cap in tenth-bps units. Must be > 0 to approve."},"numOrders":{"type":"number","description":"Revenue share escrow concurrent order capacity (1-128, default: 16).","default":16},"simulate":{"type":"boolean","description":"Whether to simulate transaction before returning (default: true)","default":true}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tx":{"type":"string","description":"Base64 encoded transaction"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true},"message":{"type":"string"}}}}}}}}},"/tx/settlePnl":{"post":{"tags":["Transactions"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Build a transaction to settle unrealized perp PnL into the user's settled balance. If <code>symbols</code> is omitted, the transaction targets all configured perp markets.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["accountId"],"additionalProperties":false,"properties":{"accountId":{"type":"string","description":"Velocity user account public key (subaccount address, not authority)"},"symbols":{"type":"array","description":"Optional market filter. Provide perp market symbols to settle; omit to target all configured perp markets.","items":{"type":"string"},"minItems":1},"simulate":{"type":"boolean","description":"Whether to simulate settlement before returning the transaction (default: true).","default":true}}}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tx":{"type":"string","description":"Base64 encoded transaction"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"number","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string","nullable":true},"message":{"type":"string","nullable":true}}}}}}}}},"/user/{accountId}/deposits":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\t\tRetrieve deposit records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/deposits/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve deposit records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/rewards":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\t\tRetrieve reward records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/rewards/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve reward records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"amount":{"type":"string"},"oraclePrice":{"type":"string"},"marketDepositBalance":{"type":"string"},"marketWithdrawBalance":{"type":"string"},"marketCumulativeDepositInterest":{"type":"string"},"marketCumulativeBorrowInterest":{"type":"string"},"totalDepositsAfter":{"type":"string"},"totalWithdrawsAfter":{"type":"string"},"depositRecordId":{"type":"string"},"userAuthority":{"type":"string"},"user":{"type":"string"},"direction":{"type":"string"},"explanation":{"type":"string"},"marketIndex":{"type":"integer"},"symbol":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","amount","oraclePrice","marketDepositBalance","marketWithdrawBalance","marketCumulativeDepositInterest","marketCumulativeBorrowInterest","totalDepositsAfter","totalWithdrawsAfter","depositRecordId","userAuthority","user","direction","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/fundingPayments":{"get":{"tags":["User"],"description":"<p>\n\t                Retrieve funding payment records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t            </p>\n\t            <p>\n\t                <strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t            </p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"userAuthority":{"type":"string"},"user":{"type":"string"},"marketIndex":{"type":"integer"},"fundingPayment":{"type":"string"},"baseAssetAmount":{"type":"string"},"userLastCumulativeFunding":{"type":"string"},"ammCumulativeFundingLong":{"type":"string"},"ammCumulativeFundingShort":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","userAuthority","user","marketIndex","fundingPayment","baseAssetAmount","userLastCumulativeFunding","ammCumulativeFundingLong","ammCumulativeFundingShort"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/fundingPayments/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve funding payment records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"userAuthority":{"type":"string"},"user":{"type":"string"},"marketIndex":{"type":"integer"},"fundingPayment":{"type":"string"},"baseAssetAmount":{"type":"string"},"userLastCumulativeFunding":{"type":"string"},"ammCumulativeFundingLong":{"type":"string"},"ammCumulativeFundingShort":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","userAuthority","user","marketIndex","fundingPayment","baseAssetAmount","userLastCumulativeFunding","ammCumulativeFundingLong","ammCumulativeFundingShort"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/liquidations":{"get":{"tags":["User"],"description":"<p>\n\t                Retrieve liquidation records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 unique liquidations per request.\n\t            </p>\n\t            <p>\n\t                <strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t            </p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"liquidationType":{"type":"string"},"user":{"type":"string"},"liquidator":{"type":"string"},"marginRequirement":{"type":"string"},"totalCollateral":{"type":"string"},"marginFreed":{"type":"string"},"liquidationId":{"type":"string"},"bankrupt":{"type":"boolean"},"canceledOrderIds":{"type":"array","items":{"type":"string"}},"liquidatePerp_marketIndex":{"type":"integer"},"liquidatePerp_oraclePrice":{"type":"string"},"liquidatePerp_baseAssetAmount":{"type":"string"},"liquidatePerp_quoteAssetAmount":{"type":"string"},"liquidatePerp_lpShares":{"type":"string"},"liquidatePerp_fillRecordId":{"type":"string"},"liquidatePerp_userOrderId":{"type":"string"},"liquidatePerp_liquidatorOrderId":{"type":"string"},"liquidatePerp_liquidatorFee":{"type":"string"},"liquidatePerp_ifFee":{"type":"string"},"liquidateSpot_assetMarketIndex":{"type":"integer"},"liquidateSpot_assetPrice":{"type":"string"},"liquidateSpot_assetTransfer":{"type":"string"},"liquidateSpot_liabilityMarketIndex":{"type":"integer"},"liquidateSpot_liabilityPrice":{"type":"string"},"liquidateSpot_liabilityTransfer":{"type":"string"},"liquidateSpot_ifFee":{"type":"string"},"liquidateBorrowForPerpPnl_perpMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_marketOraclePrice":{"type":"string"},"liquidateBorrowForPerpPnl_pnlTransfer":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_liabilityPrice":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_perpMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_marketOraclePrice":{"type":"string"},"liquidatePerpPnlForDeposit_pnlTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_assetMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_assetPrice":{"type":"string"},"liquidatePerpPnlForDeposit_assetTransfer":{"type":"string"},"perpBankruptcy_marketIndex":{"type":"integer"},"perpBankruptcy_pnl":{"type":"string"},"perpBankruptcy_ifPayment":{"type":"string"},"perpBankruptcy_clawbackUser":{"type":"string"},"perpBankruptcy_clawbackUserPayment":{"type":"string"},"perpBankruptcy_cumulativeFundingRateDelta":{"type":"string"},"spotBankruptcy_marketIndex":{"type":"integer"},"spotBankruptcy_borrowAmount":{"type":"string"},"spotBankruptcy_ifPayment":{"type":"string"},"spotBankruptcy_cumulativeDepositInterestDelta":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","liquidationType","user","liquidator","marginRequirement","totalCollateral","marginFreed","liquidationId","bankrupt","canceledOrderIds","liquidatePerp_marketIndex","liquidatePerp_oraclePrice","liquidatePerp_baseAssetAmount","liquidatePerp_quoteAssetAmount","liquidatePerp_lpShares","liquidatePerp_fillRecordId","liquidatePerp_userOrderId","liquidatePerp_liquidatorOrderId","liquidatePerp_liquidatorFee","liquidatePerp_ifFee","liquidateSpot_assetMarketIndex","liquidateSpot_assetPrice","liquidateSpot_assetTransfer","liquidateSpot_liabilityMarketIndex","liquidateSpot_liabilityPrice","liquidateSpot_liabilityTransfer","liquidateSpot_ifFee","liquidateBorrowForPerpPnl_perpMarketIndex","liquidateBorrowForPerpPnl_marketOraclePrice","liquidateBorrowForPerpPnl_pnlTransfer","liquidateBorrowForPerpPnl_liabilityMarketIndex","liquidateBorrowForPerpPnl_liabilityPrice","liquidateBorrowForPerpPnl_liabilityTransfer","liquidatePerpPnlForDeposit_perpMarketIndex","liquidatePerpPnlForDeposit_marketOraclePrice","liquidatePerpPnlForDeposit_pnlTransfer","liquidatePerpPnlForDeposit_assetMarketIndex","liquidatePerpPnlForDeposit_assetPrice","liquidatePerpPnlForDeposit_assetTransfer","perpBankruptcy_marketIndex","perpBankruptcy_pnl","perpBankruptcy_ifPayment","perpBankruptcy_clawbackUser","perpBankruptcy_clawbackUserPayment","perpBankruptcy_cumulativeFundingRateDelta","spotBankruptcy_marketIndex","spotBankruptcy_borrowAmount","spotBankruptcy_ifPayment","spotBankruptcy_cumulativeDepositInterestDelta"]}},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/liquidations/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve liquidation records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"liquidationType":{"type":"string"},"user":{"type":"string"},"liquidator":{"type":"string"},"marginRequirement":{"type":"string"},"totalCollateral":{"type":"string"},"marginFreed":{"type":"string"},"liquidationId":{"type":"string"},"bankrupt":{"type":"boolean"},"canceledOrderIds":{"type":"array","items":{"type":"string"}},"liquidatePerp_marketIndex":{"type":"integer"},"liquidatePerp_oraclePrice":{"type":"string"},"liquidatePerp_baseAssetAmount":{"type":"string"},"liquidatePerp_quoteAssetAmount":{"type":"string"},"liquidatePerp_lpShares":{"type":"string"},"liquidatePerp_fillRecordId":{"type":"string"},"liquidatePerp_userOrderId":{"type":"string"},"liquidatePerp_liquidatorOrderId":{"type":"string"},"liquidatePerp_liquidatorFee":{"type":"string"},"liquidatePerp_ifFee":{"type":"string"},"liquidateSpot_assetMarketIndex":{"type":"integer"},"liquidateSpot_assetPrice":{"type":"string"},"liquidateSpot_assetTransfer":{"type":"string"},"liquidateSpot_liabilityMarketIndex":{"type":"integer"},"liquidateSpot_liabilityPrice":{"type":"string"},"liquidateSpot_liabilityTransfer":{"type":"string"},"liquidateSpot_ifFee":{"type":"string"},"liquidateBorrowForPerpPnl_perpMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_marketOraclePrice":{"type":"string"},"liquidateBorrowForPerpPnl_pnlTransfer":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityMarketIndex":{"type":"integer"},"liquidateBorrowForPerpPnl_liabilityPrice":{"type":"string"},"liquidateBorrowForPerpPnl_liabilityTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_perpMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_marketOraclePrice":{"type":"string"},"liquidatePerpPnlForDeposit_pnlTransfer":{"type":"string"},"liquidatePerpPnlForDeposit_assetMarketIndex":{"type":"integer"},"liquidatePerpPnlForDeposit_assetPrice":{"type":"string"},"liquidatePerpPnlForDeposit_assetTransfer":{"type":"string"},"perpBankruptcy_marketIndex":{"type":"integer"},"perpBankruptcy_pnl":{"type":"string"},"perpBankruptcy_ifPayment":{"type":"string"},"perpBankruptcy_clawbackUser":{"type":"string"},"perpBankruptcy_clawbackUserPayment":{"type":"string"},"perpBankruptcy_cumulativeFundingRateDelta":{"type":"string"},"spotBankruptcy_marketIndex":{"type":"integer"},"spotBankruptcy_borrowAmount":{"type":"string"},"spotBankruptcy_ifPayment":{"type":"string"},"spotBankruptcy_cumulativeDepositInterestDelta":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","liquidationType","user","liquidator","marginRequirement","totalCollateral","marginFreed","liquidationId","bankrupt","canceledOrderIds","liquidatePerp_marketIndex","liquidatePerp_oraclePrice","liquidatePerp_baseAssetAmount","liquidatePerp_quoteAssetAmount","liquidatePerp_lpShares","liquidatePerp_fillRecordId","liquidatePerp_userOrderId","liquidatePerp_liquidatorOrderId","liquidatePerp_liquidatorFee","liquidatePerp_ifFee","liquidateSpot_assetMarketIndex","liquidateSpot_assetPrice","liquidateSpot_assetTransfer","liquidateSpot_liabilityMarketIndex","liquidateSpot_liabilityPrice","liquidateSpot_liabilityTransfer","liquidateSpot_ifFee","liquidateBorrowForPerpPnl_perpMarketIndex","liquidateBorrowForPerpPnl_marketOraclePrice","liquidateBorrowForPerpPnl_pnlTransfer","liquidateBorrowForPerpPnl_liabilityMarketIndex","liquidateBorrowForPerpPnl_liabilityPrice","liquidateBorrowForPerpPnl_liabilityTransfer","liquidatePerpPnlForDeposit_perpMarketIndex","liquidatePerpPnlForDeposit_marketOraclePrice","liquidatePerpPnlForDeposit_pnlTransfer","liquidatePerpPnlForDeposit_assetMarketIndex","liquidatePerpPnlForDeposit_assetPrice","liquidatePerpPnlForDeposit_assetTransfer","perpBankruptcy_marketIndex","perpBankruptcy_pnl","perpBankruptcy_ifPayment","perpBankruptcy_clawbackUser","perpBankruptcy_clawbackUserPayment","perpBankruptcy_cumulativeFundingRateDelta","spotBankruptcy_marketIndex","spotBankruptcy_borrowAmount","spotBankruptcy_ifPayment","spotBankruptcy_cumulativeDepositInterestDelta"]}},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/lp":{"get":{"tags":["User"],"description":"<p>\n\t                        Retrieve LP records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t                    </p>\n\t                    <p>\n\t                        <strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t                    </p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"user":{"type":"string"},"action":{"type":"string"},"marketIndex":{"type":"integer"},"nShares":{"type":"string"},"deltaBaseAssetAmount":{"type":"string"},"deltaQuoteAssetAmount":{"type":"string"},"pnl":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","user","action","marketIndex","nShares","deltaBaseAssetAmount","deltaQuoteAssetAmount","pnl"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/lp/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve LP records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"user":{"type":"string"},"action":{"type":"string"},"marketIndex":{"type":"integer"},"nShares":{"type":"string"},"deltaBaseAssetAmount":{"type":"string"},"deltaQuoteAssetAmount":{"type":"string"},"pnl":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","user","action","marketIndex","nShares","deltaBaseAssetAmount","deltaQuoteAssetAmount","pnl"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/predictions":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\t\tRetrieve prediction records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/predictions/{symbol}":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\t\tRetrieve prediction records for a specific account and BET market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/predictions/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve prediction records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/settlePnl":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\t\tRetrieve settle pnl records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"pnl":{"type":"string"},"user":{"type":"string"},"baseAssetAmount":{"type":"string"},"quoteAssetAmountAfter":{"type":"string"},"quoteEntryAmount":{"type":"string"},"settlePrice":{"type":"string"},"marketIndex":{"type":"integer"},"explanation":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","pnl","user","baseAssetAmount","quoteAssetAmountAfter","quoteEntryAmount","settlePrice","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/settlePnl/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve settle pnl records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"pnl":{"type":"string"},"user":{"type":"string"},"baseAssetAmount":{"type":"string"},"quoteAssetAmountAfter":{"type":"string"},"quoteEntryAmount":{"type":"string"},"settlePrice":{"type":"string"},"marketIndex":{"type":"integer"},"explanation":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","pnl","user","baseAssetAmount","quoteAssetAmountAfter","quoteEntryAmount","settlePrice","marketIndex","explanation"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/swaps":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\t\tRetrieve swap records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t\t</p>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"txSig":{"type":"string"},"txSigIndex":{"type":"number"},"slot":{"type":"number"},"user":{"type":"string"},"outMarketIndex":{"type":"number"},"inMarketIndex":{"type":"number"},"outSymbol":{"type":"string"},"inSymbol":{"type":"string"},"isInMarket":{"type":"boolean"},"amountOut":{"type":"string"},"amountIn":{"type":"string"},"outOraclePrice":{"type":"string"},"inOraclePrice":{"type":"string"},"fee":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","user","amountOut","amountIn","outMarketIndex","inMarketIndex","outOraclePrice","inOraclePrice","fee"],"additionalProperties":false},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/swaps/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve trade records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"txSig":{"type":"string"},"txSigIndex":{"type":"number"},"slot":{"type":"number"},"user":{"type":"string"},"outMarketIndex":{"type":"number"},"inMarketIndex":{"type":"number"},"outSymbol":{"type":"string"},"inSymbol":{"type":"string"},"isInMarket":{"type":"boolean"},"amountOut":{"type":"string"},"amountIn":{"type":"string"},"outOraclePrice":{"type":"string"},"inOraclePrice":{"type":"string"},"fee":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","user","amountOut","amountIn","outMarketIndex","inMarketIndex","outOraclePrice","inOraclePrice","fee"],"additionalProperties":false},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/trades":{"get":{"tags":["User"],"description":"<p>\n\t                Retrieve trade records for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t            </p>\n\t            <p>\n\t                <strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t            </p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/trades/{symbol}":{"get":{"tags":["User"],"description":"<p>\n\t                Retrieve trade records for a specific account and market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t            </p>\n\t            <p>\n\t                <strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t            </p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/trades/{year}/{month}":{"get":{"tags":["User"],"description":"<p>Retrieve trade records for a specific account for a given year and month.</p>","parameters":[{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","default":"json","enum":["json","csv"]},"in":"query","name":"format","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"integer","minimum":2022},"in":"path","name":"year","required":true,"description":"Year in YYYY format"},{"schema":{"type":"integer","minimum":1,"maximum":12},"in":"path","name":"month","required":true,"description":"Month from 1 to 12"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"records":{"type":"integer","nullable":true},"totalRecords":{"type":"integer","nullable":true},"currentPage":{"type":"integer","nullable":true},"totalPages":{"type":"integer","nullable":true},"nextPage":{"type":"integer","nullable":true},"includesLatest":{"type":"boolean","nullable":true}}}}}}}}}}},"/user/{accountId}/orders/{marketFilter}":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\tRetrieve orders for a specific account and market type, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"number"},"in":"query","name":"startTs","required":false,"description":"Start timestamp (unix seconds)."},{"schema":{"type":"number"},"in":"query","name":"endTs","required":false,"description":"End timestamp (unix seconds)."},{"schema":{"type":"boolean"},"in":"query","name":"hasFill","required":false,"description":"When true, only orders with at least one fill are returned."},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"string","enum":["spot","perp","prediction"]},"in":"path","name":"marketFilter","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"txSig":{"type":"string"},"txSigIndex":{"type":"number"},"slot":{"type":"number"},"user":{"type":"string"},"status":{"type":"string"},"orderType":{"type":"string"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"orderId":{"type":"number"},"userOrderId":{"type":"number"},"marketIndex":{"type":"number"},"price":{"type":"string"},"baseAssetAmount":{"type":"string"},"quoteAssetAmount":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"direction":{"type":"string"},"reduceOnly":{"type":"boolean"},"triggerPrice":{"type":"string"},"triggerCondition":{"type":"string"},"existingPositionDirection":{"type":"string"},"postOnly":{"type":"boolean"},"immediateOrCancel":{"type":"boolean"},"oraclePriceOffset":{"type":"string"},"auctionDuration":{"type":"number"},"auctionStartPrice":{"type":"string"},"auctionEndPrice":{"type":"string"},"maxTs":{"type":"number"},"symbol":{"type":"string"},"lastActionStatus":{"type":"string","enum":["partial_fill_cancelled","cancelled","partial_fill","filled","open","expired","trigger"]},"lastActionExplanation":{"type":"string"},"lastUpdatedTs":{"type":"number"},"cumulativeFee":{"type":"string","nullable":true}},"required":["ts","txSig","txSigIndex","slot","user","status","orderType","marketType","orderId","userOrderId","marketIndex","price","baseAssetAmount","quoteAssetAmount","baseAssetAmountFilled","quoteAssetAmountFilled","direction","reduceOnly","triggerPrice","triggerCondition","existingPositionDirection","postOnly","immediateOrCancel","oraclePriceOffset","auctionDuration","auctionStartPrice","auctionEndPrice","maxTs"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/orders/id/{orderId}":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\tRetrieve order for user by orderId.\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<strong>Note:</strong> This endpoint provides orders within the last 31 days.\n\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"number"},"in":"path","name":"orderId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"record":{"type":"object","properties":{"ts":{"type":"number"},"txSig":{"type":"string"},"txSigIndex":{"type":"number"},"slot":{"type":"number"},"user":{"type":"string"},"status":{"type":"string"},"orderType":{"type":"string"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"orderId":{"type":"number"},"userOrderId":{"type":"number"},"marketIndex":{"type":"number"},"price":{"type":"string"},"baseAssetAmount":{"type":"string"},"quoteAssetAmount":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"direction":{"type":"string"},"reduceOnly":{"type":"boolean"},"triggerPrice":{"type":"string"},"triggerCondition":{"type":"string"},"existingPositionDirection":{"type":"string"},"postOnly":{"type":"boolean"},"immediateOrCancel":{"type":"boolean"},"oraclePriceOffset":{"type":"string"},"auctionDuration":{"type":"number"},"auctionStartPrice":{"type":"string"},"auctionEndPrice":{"type":"string"},"maxTs":{"type":"number"},"symbol":{"type":"string"},"lastActionStatus":{"type":"string","enum":["partial_fill_cancelled","cancelled","partial_fill","filled","open","expired","trigger"]},"lastActionExplanation":{"type":"string"},"lastUpdatedTs":{"type":"number"},"cumulativeFee":{"type":"string","nullable":true}},"required":["ts","txSig","txSigIndex","slot","user","status","orderType","marketType","orderId","userOrderId","marketIndex","price","baseAssetAmount","quoteAssetAmount","baseAssetAmountFilled","quoteAssetAmountFilled","direction","reduceOnly","triggerPrice","triggerCondition","existingPositionDirection","postOnly","immediateOrCancel","oraclePriceOffset","auctionDuration","auctionStartPrice","auctionEndPrice","maxTs"]}}}}}}}}},"/user/{accountId}/orders/{marketFilter}/{symbol}":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\tRetrieve order records for a specific account and market, with optional pagination. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"boolean"},"in":"query","name":"hasFill","required":false,"description":"When true, only orders with at least one fill are returned."},{"schema":{"type":"number"},"in":"query","name":"startTs","required":false,"description":"Start timestamp (unix seconds)."},{"schema":{"type":"number"},"in":"query","name":"endTs","required":false,"description":"End timestamp (unix seconds)."},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"string","enum":["spot","perp","prediction"]},"in":"path","name":"marketFilter","required":true},{"schema":{"type":"string"},"in":"path","name":"symbol","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"number"},"txSig":{"type":"string"},"txSigIndex":{"type":"number"},"slot":{"type":"number"},"user":{"type":"string"},"status":{"type":"string"},"orderType":{"type":"string"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"orderId":{"type":"number"},"userOrderId":{"type":"number"},"marketIndex":{"type":"number"},"price":{"type":"string"},"baseAssetAmount":{"type":"string"},"quoteAssetAmount":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"direction":{"type":"string"},"reduceOnly":{"type":"boolean"},"triggerPrice":{"type":"string"},"triggerCondition":{"type":"string"},"existingPositionDirection":{"type":"string"},"postOnly":{"type":"boolean"},"immediateOrCancel":{"type":"boolean"},"oraclePriceOffset":{"type":"string"},"auctionDuration":{"type":"number"},"auctionStartPrice":{"type":"string"},"auctionEndPrice":{"type":"string"},"maxTs":{"type":"number"},"symbol":{"type":"string"},"lastActionStatus":{"type":"string","enum":["partial_fill_cancelled","cancelled","partial_fill","filled","open","expired","trigger"]},"lastActionExplanation":{"type":"string"},"lastUpdatedTs":{"type":"number"},"cumulativeFee":{"type":"string","nullable":true}},"required":["ts","txSig","txSigIndex","slot","user","status","orderType","marketType","orderId","userOrderId","marketIndex","price","baseAssetAmount","quoteAssetAmount","baseAssetAmountFilled","quoteAssetAmountFilled","direction","reduceOnly","triggerPrice","triggerCondition","existingPositionDirection","postOnly","immediateOrCancel","oraclePriceOffset","auctionDuration","auctionStartPrice","auctionEndPrice","maxTs"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/orders/{orderId}/actions":{"get":{"tags":["User"],"description":"<p>\n\t\t\t\t\tRetrieve the update actions to an order. Results are ordered from newest to oldest, with up to 20 records per request.\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<strong>Note:</strong> This endpoint provides records for the last 31 days.\n\t\t\t\t</p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true},{"schema":{"type":"number"},"in":"path","name":"orderId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee"]},"maxItems":20},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/positions":{"get":{"tags":["User"],"description":"<p>\n                Retrieve position closing trade records accumulated by orderId for a specific account, with optional pagination. Results are ordered from newest to oldest, with up to 20 unique orders per request.\n            </p>\n            <p>\n                <strong>Note:</strong> This endpoint provides records for the last 31 days.\n            </p>","parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"ts":{"type":"integer"},"txSig":{"type":"string"},"txSigIndex":{"type":"integer"},"slot":{"type":"integer"},"fillerReward":{"type":"string"},"baseClosedForPnl":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"takerFee":{"type":"string"},"makerRebate":{"type":"string"},"referrerReward":{"type":"string"},"quoteAssetAmountSurplus":{"type":"string"},"takerOrderBaseAssetAmount":{"type":"string"},"takerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"takerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"makerOrderBaseAssetAmount":{"type":"string"},"makerOrderCumulativeBaseAssetAmountFilled":{"type":"string"},"makerOrderCumulativeQuoteAssetAmountFilled":{"type":"string"},"oraclePrice":{"type":"string"},"makerFee":{"type":"string"},"action":{"type":"string"},"actionExplanation":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"marketFilter":{"type":"string"},"filler":{"type":"string"},"fillRecordId":{"type":"string"},"taker":{"type":"string"},"takerOrderId":{"type":"string"},"takerOrderDirection":{"type":"string"},"maker":{"type":"string"},"makerOrderId":{"type":"string"},"makerOrderDirection":{"type":"string"},"spotFulfillmentMethodFee":{"type":"string"},"userFee":{"type":"string"},"user":{"type":"string"},"symbol":{"type":"string"},"bitFlags":{"type":"number"},"userExistingQuoteEntryAmount":{"type":"string"},"userExistingBaseAssetAmount":{"type":"string"},"takerExistingQuoteEntryAmount":{"type":"string"},"takerExistingBaseAssetAmount":{"type":"string"},"makerExistingQuoteEntryAmount":{"type":"string"},"makerExistingBaseAssetAmount":{"type":"string"}},"required":["ts","txSig","txSigIndex","slot","fillerReward","baseAssetAmountFilled","quoteAssetAmountFilled","takerFee","makerRebate","referrerReward","quoteAssetAmountSurplus","takerOrderBaseAssetAmount","takerOrderCumulativeBaseAssetAmountFilled","takerOrderCumulativeQuoteAssetAmountFilled","makerOrderBaseAssetAmount","makerOrderCumulativeBaseAssetAmountFilled","makerOrderCumulativeQuoteAssetAmountFilled","oraclePrice","makerFee","action","actionExplanation","marketIndex","marketType","filler","fillRecordId","taker","takerOrderId","takerOrderDirection","maker","makerOrderId","makerOrderDirection","spotFulfillmentMethodFee","userFee","baseClosedForPnl"]}},"meta":{"type":"object","properties":{"nextPage":{"type":"string","nullable":true}}}}}}}}}}},"/user/{accountId}/snapshots/trading":{"get":{"tags":["User"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"accountBalance":{"type":"string"},"unrealizedPnl":{"type":"string"},"cumulativeRealizedPnl":{"type":"string"},"unsettledPnl":{"type":"string"},"cumulativeSettledPnl":{"type":"string"},"cumulativeFunding":{"type":"string"},"cumulativeFeePaid":{"type":"string"},"cumulativeFeeRebate":{"type":"string"},"cumulativeTakerVolume":{"type":"string"},"cumulativeMakerVolume":{"type":"string"}}}},"metrics":{"type":"object","nullable":true,"properties":{"cumulativeRealizedPnl":{"type":"string"},"cumulativeMakerVolume":{"type":"string"},"cumulativeTakerVolume":{"type":"string"},"cumulativeFeePaid":{"type":"string"},"cumulativeFeeRebate":{"type":"string"}}}}}}}}}}},"/user/{accountId}/snapshots/earn":{"get":{"tags":["User"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"assets":{"type":"array","items":{"type":"object","properties":{"marketIndex":{"type":"number"},"balance":{"type":"string"},"deposits":{"type":"string"},"rewards":{"type":"string"},"withdrawals":{"type":"string"},"pnl":{"type":"string"},"interestBaseValue":{"type":"string"},"interestQuoteValue":{"type":"string"},"oraclePrice":{"type":"string"}},"required":["marketIndex","balance","deposits","withdrawals","pnl","interestBaseValue","interestQuoteValue","oraclePrice"]}}},"required":["ts","assets"]}},"meta":{"flagged":{"type":"number "}}}}}}}}}},"/user/{accountId}/snapshots/vaults":{"get":{"tags":["User"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":7},"in":"query","name":"days","required":false},{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snapshots":{"type":"array","items":{"type":"object","nullable":true,"properties":{"ts":{"type":"number"},"vault":{"type":"string"},"totalAccountValue":{"type":"string"},"totalAccountBaseValue":{"type":"string"},"netDeposits":{"type":"string"},"marketIndex":{"type":"number"}},"required":["ts","vault","totalAccountValue","totalAccountBaseValue","marketIndex"]}}}}}}}}}},"/user/{accountId}":{"get":{"tags":["User"],"description":"<strong>This endpoint is currently in BETA and should only be used for test purposes</strong> <br>Retrieve the current state of the user account from on chain.","parameters":[{"schema":{"type":"string"},"in":"path","name":"accountId","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"account":{"type":"object","properties":{"balance":{"type":"string"},"totalCollateral":{"type":"string"},"freeCollateral":{"type":"string"},"health":{"type":"string"},"initialMargin":{"type":"string"},"maintenanceMargin":{"type":"string"},"leverage":{"type":"string"}}},"positions":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"marketIndex":{"type":"integer"},"marginMode":{"type":"string"},"baseAssetAmount":{"type":"string"},"quoteEntryAmount":{"type":"string"},"settledPnl":{"type":"string"},"feesAndFunding":{"type":"string"},"liquidationPrice":{"type":"string"}}}},"balances":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"marketIndex":{"type":"integer"},"balance":{"type":"string"},"openOrders":{"type":"integer"},"liquidationPrice":{"type":"string"}}}},"orders":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"marketIndex":{"type":"integer"},"marketType":{"type":"string"},"orderId":{"type":"integer"},"price":{"type":"string"},"baseAssetAmount":{"type":"string"},"baseAssetAmountFilled":{"type":"string"},"quoteAssetAmountFilled":{"type":"string"},"status":{"type":"string"},"orderType":{"type":"string"},"direction":{"type":"string"},"reduceOnly":{"type":"boolean"},"postOnly":{"type":"boolean"},"triggerPrice":{"type":"string"},"triggerCondition":{"type":"string"}}}}}}}}}}}},"/vaults":{"get":{"tags":["Public"],"description":"Public read of the vault config array. Used by the trading UI; 1-min CloudFront cache.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"vaults":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}}},"tags":[{"name":"Notifications","description":"Endpoints to handle user notifications"},{"name":"User","description":"Endpoints to fetch user records"},{"name":"Authority","description":"Endpoints to fetch authority records"},{"name":"Market","description":"Endpoints to fetch market data"},{"name":"Stats","description":"Endpoints to fetch statistics"},{"name":"AMM","description":"Endpoints to fetch historical AMM data. For all AMM endpoints, the step size between data points is calculated automatically based on the requested number of `samples` (default = 11_000 max), with a minimum step size being 20 seconds. Thus the maximum queryable duration to still get a 20 second step size is about 220,000 seconds (approximately 2.54 days)."},{"name":"WebSocket","description":"Real-time WebSocket connections"}]}