### HTTP GET Request Example for Documentation Query Source: https://docs.coinmarketman.com/vibecoding/find-which-coin-the-entire-market-is-on-the-wrong-side-of To get additional information not directly on the page, perform an HTTP GET request with an 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.coinmarketman.com/vibecoding/find-which-coin-the-entire-market-is-on-the-wrong-side-of.md?ask= ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://docs.coinmarketman.com/vibecoding/follow-todays-top-earning-traders-and-copy-their-moves Perform an HTTP GET request to the current page URL with the 'ask' query parameter to retrieve specific information not explicitly present on the page. The question should be clear and self-contained. ```http GET https://docs.coinmarketman.com/vibecoding/follow-todays-top-earning-traders-and-copy-their-moves.md?ask= ``` -------------------------------- ### Response Example for 5m Order Snapshots Source: https://docs.coinmarketman.com/rest-api/order-data This is an example of a successful JSON response when querying for 5-minute order snapshots. It includes an 'orders' array and a 'nextCursor' for pagination. ```json { "orders": [ { "height": 964633454, "address": "0xdef1b00b0fffeda0bf2f1adc3cd0ed4ec12c5e93", "oid": 756322353, "coin": "BTC", "side": "B", "limitPx": 21500, "sz": 0.00465, "timestamp": "2023-07-18T10:30:51.626Z", "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [], "isPositionTpsl": false, "reduceOnly": false, "orderType": "Limit", "origSz": 0, "tif": "", "cloid": "", "status": "open", "builder": "", "builderFee": 0, "untriggered": false, "snapshotTs": "2026-04-19T11:05:00.000Z" }, { "height": 964633454, "address": "0x42ff1c2d4794a00b67e2da9e5cf3d06432ef7bb3", "oid": 1164652284, "coin": "BTC", "side": "B", "limitPx": 24206, "sz": 0.02522, "timestamp": "2023-08-22T16:48:54.365Z", "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [] ``` -------------------------------- ### Fetch Latest Open Orders Snapshot (JavaScript) Source: https://docs.coinmarketman.com/rest-api/order-data This JavaScript code demonstrates how to construct a URL with query parameters and fetch open order data using the `fetch` API. It includes examples for setting `limit`, `coin`, and `orderType`, with commented-out options for `nextCursor`, `address`, `oid`, `start`, and `end`. ```javascript const url = new URL("https://ht-api.coinmarketman.com/api/external/orders/5m-snapshots/latest"); url.searchParams.set("limit", "100"); url.searchParams.set("coin", "BTC"); url.searchParams.set("orderType", "Limit"); // url.searchParams.set("nextCursor", "YOUR_CURSOR"); // url.searchParams.set("address", "0x..."); // url.searchParams.set("oid", "987654321"); // url.searchParams.set("start", "2026-02-10T11:47:19.099Z"); // url.searchParams.set("end", "2026-02-10T12:47:19.099Z"); const res = await fetch(url.toString(), { method: "GET" }); const data = await res.json(); console.log(data); ``` -------------------------------- ### Ask a Question via GET Request Source: https://docs.coinmarketman.com/segmentation Use this GET request to query the documentation index with a natural language question. The response includes the answer and relevant excerpts. ```http GET https://docs.coinmarketman.com/hypertracker-api-documentation.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.coinmarketman.com/resources To get information not explicitly present on a page, perform an HTTP GET request to the current URL with an 'ask' query parameter. The question should be specific and in natural language. The response will include a direct answer and relevant excerpts. ```HTTP GET https://docs.coinmarketman.com/resources.md?ask= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.coinmarketman.com/vibecoding/daily-market-brief-everything-that-matters-in-60-seconds To get more information not explicitly on the page, perform an HTTP GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://docs.coinmarketman.com/vibecoding/daily-market-brief-everything-that-matters-in-60-seconds.md?ask= ``` -------------------------------- ### Builders List Response Example Source: https://docs.coinmarketman.com/rest-api/builder-analytics This is an example of the JSON response structure when successfully retrieving the builders list. It includes various financial metrics for each builder. ```json [ { "address": "0x082e843a431aef031264dc232693dd710aedca88", "perpEquity": 18472178.849423, "openValue": 57053723.64972, "openValueLong": 57053723.64972, "pnlDay": 3564355.038546, "pnlWeek": -122076.444524, "pnlMonth": 16819083.289023, "pnlAllTime": 249592.445917, "volumeDay": 0, "volumeWeek": 0, "volumeMonth": 0, "volumeAllTime": 94884771.39, "pnlPercentDay": 24.0104616497315, "pnlPercentWeek": -0.587763847606627, "pnlPercentMonth": 401.908646838273, "pnlPercentAllTime": 0.875641615121957 }, { "address": "0xeadc152ac1014ace57c6b353f89adf5faffe9d55", "perpEquity": 31186378.24408, "openValue": 138118339.253674, "openValueLong": 136628987.826759, "pnlDay": 2776726.133462, "pnlWeek": -7797101.283362, "pnlMonth": 9150674.660106, "pnlAllTime": -18569232.887384, "volumeDay": 0, "volumeWeek": 17259658.68, "volumeMonth": 208273378.05, "volumeAllTime": 714830239.79, "pnlPercentDay": 10.0417480018821, "pnlPercentWeek": -20.3975647409841, "pnlPercentMonth": 30.8479570067147, "pnlPercentAllTime": -48.231369841972 }, { "address": "0xa5b0edf6b55128e0ddae8e51ac538c3188401d41", "perpEquity": 41783482.568422, "openValue": 203072870.08463, "openValueLong": 203072870.08463, "pnlDay": 2770305.462672, "pnlWeek": -8346036.779757, "pnlMonth": 22948370.47943, "pnlAllTime": 11593413.210329, "volumeDay": 0, "volumeWeek": 67659433.97, "volumeMonth": 251504340.97, "volumeAllTime": 1358663549.44, "pnlPercentDay": 7.02464602183992, "pnlPercentWeek": -19.1628191483878, "pnlPercentMonth": 71.6351656851812, "pnlPercentAllTime": 26.7190776363126 }, { "address": "0x6c8512516ce5669d35113a11ca8b8de322fd84f6", "perpEquity": 11583400.515941, "openValue": 109235012.88973, "openValueLong": 109235012.88973, "pnlDay": 1513793.559309, "pnlWeek": -6555687.58796, "pnlMonth": 11933169.936335, "pnlAllTime": 8481420.09295, "volumeDay": 0, "volumeWeek": 0, "volumeMonth": 9283472.34, "volumeAllTime": 100605733.35, "pnlPercentDay": 14.5792015530806, "pnlPercentWeek": -50.7721660436473, "pnlPercentMonth": 102.317607770646, "pnlPercentAllTime": 56.114014022028 }, { "address": "0x8def9f50456c6c4e37fa5d3d57f108ed23992dae", "perpEquity": 22201360.199108, "openValue": 24674622.97782, "openValueLong": 24674622.97782, "pnlDay": 1513282.645957, "pnlWeek": 691415.058583, "pnlMonth": -251562.636382, "pnlAllTime": 25451380.288949, "volumeDay": 417078.1, "volumeWeek": 28906975.02, "volumeMonth": 116998999.47, "volumeAllTime": 1098086732.09, "pnlPercentDay": 7.3426043410735, "pnlPercentWeek": 3.22616499039321, "pnlPercentMonth": -0.71518544634462, "pnlPercentAllTime": 176.412854329856 }, { "address": "0x61ceef212ff4a86933c69fb6aca2fe35d8f2a62b", "perpEquity": 11583400.515941, "openValue": 109235012.88973, "openValueLong": 109235012.88973, "pnlDay": 1513793.559309, "pnlWeek": -6555687.58796, "pnlMonth": 11933169.936335, "pnlAllTime": 8481420.09295, "volumeDay": 0, "volumeWeek": 0, "volumeMonth": 9283472.34, "volumeAllTime": 100605733.35, "pnlPercentDay": 14.5792015530806, "pnlPercentWeek": -50.7721660436473, "pnlPercentMonth": 102.317607770646, "pnlPercentAllTime": 56.114014022028 } ] ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.coinmarketman.com/vibecoding To get information not directly on the page, perform an HTTP GET request to the current page URL with the 'ask' query parameter. The question should be specific and self-contained. ```HTTP GET https://docs.coinmarketman.com/vibecoding.md?ask= ``` -------------------------------- ### Get Closed Trade Fills (Python) Source: https://docs.coinmarketman.com/rest-api/trader-and-wallet-data This Python example uses the `requests` library to get fills for a closed trade. Remember to substitute YOUR_API_TOKEN with your actual authentication token. The `hash_value` and `limit` can be adjusted as needed. ```python import requests hash_value = "AgymbDC-wsT-OGGpTk20pJijWHIAAAAABD6QZwAAAZ3CWZGk" response = requests.get( f"https://ht-api.coinmarketman.com/api/external/closed-trades/{hash_value}/fills", params={ "limit": 100, }, headers={ "Authorization": "Bearer YOUR_API_TOKEN", }, ) closed_trade_fills = response.json() ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.coinmarketman.com/rest-api/order-data Perform an HTTP GET request to the current page URL with the 'ask' query parameter to ask a question. The question should be specific and self-contained. The response will include a direct answer and relevant excerpts from the documentation. ```HTTP GET https://docs.coinmarketman.com/rest-api/order-data.md?ask= ``` -------------------------------- ### Get All Positions (Python) Source: https://docs.coinmarketman.com/rest-api/cohorts Retrieve all positions using the Python requests library, filtering by start date and segment ID. The 'Authorization' header is required for authentication. ```python import requests response = requests.get( "https://ht-api.coinmarketman.com/api/external/positions", params={"start": 2026-02-02, "segmentId": 6 }, headers={ "Authorization": "Bearer YOUR_API_TOKEN", }, ) result = response.json() ``` -------------------------------- ### Fetch 5m Order Snapshots with JavaScript Source: https://docs.coinmarketman.com/rest-api/order-data This JavaScript example demonstrates how to construct a URL and use the fetch API to retrieve 5-minute order snapshots. It includes optional parameters for filtering and pagination. ```javascript const snapshotTime = "2026-01-19T11:05:00+00:00"; const url = new URL( `https://ht-api.coinmarketman.com/api/external/orders/5m-snapshots/${encodeURIComponent(snapshotTime)}` ); url.searchParams.set("limit", "100"); url.searchParams.set("coin", "BTC"); // url.searchParams.set("nextCursor", "YOUR_CURSOR"); // url.searchParams.set("address", "0x..."); // url.searchParams.set("oid", "987654321"); // url.searchParams.set("start", "2026-02-10T11:00:00.000Z"); // url.searchParams.set("end", "2026-02-10T12:00:00.000Z"); // url.searchParams.set("orderType", "Limit"); const res = await fetch(url.toString(), { method: "GET" }); const data = await res.json(); console.log(data); ``` -------------------------------- ### Get All Positions (Curl) Source: https://docs.coinmarketman.com/rest-api/cohorts Use this cURL command to fetch all positions, filtering by start time and segment ID. Ensure you replace YOUR_API_TOKEN with your actual authentication token. ```curl curl --request GET \ --url 'https://api.example.com/api/external/positions?start=2026-02-02T15:15:28.404Z&segmentId=6' \ --header 'Authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Get BTC Segment Metrics (Python) Source: https://docs.coinmarketman.com/rest-api/cohorts This Python script fetches cohort metrics for Bitcoin using the requests library. Ensure you have the library installed. The response is parsed as JSON. ```python import requests response = requests.get( 'https://ht-api.coinmarketman.com/api/external/exports/coins/BTC/segment-metrics', headers={'Authorization': 'Bearer YOUR_API_TOKEN'}, allow_redirects=True ) export_data = response.json() ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.coinmarketman.com/anything-missing Perform an HTTP GET request to query the documentation. Use the `ask` query parameter with a specific question in natural language to retrieve direct answers and relevant excerpts. ```http GET https://docs.coinmarketman.com/anything-missing.md?ask= ``` -------------------------------- ### Fetch All Segments (cURL) Source: https://docs.coinmarketman.com/rest-api/cohorts Use this cURL command to make a GET request to the /api/external/segments endpoint. Include your API token in the Authorization header. This example fetches segments, ordered by name. ```curl curl --request GET \ --url 'https://ht-api.coinmarketman.com/api/external/segments?limit=20&orderBy=name&order=asc' \ --header 'Authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Get All Positions (JavaScript) Source: https://docs.coinmarketman.com/rest-api/cohorts Fetch all positions using JavaScript's fetch API, specifying the start time and segment ID. The Authorization header must include your API token. ```javascript const res = await fetch( 'https://api.example.com/api/external/positions?start=2026-02-02T15:15:28.404Z&segmentId=6', { headers: { Authorization: 'Bearer YOUR_API_TOKEN' } } ); const data = await res.json(); ``` -------------------------------- ### Fetch Wallets with Query Parameters (Python) Source: https://docs.coinmarketman.com/rest-api/trader-and-wallet-data This Python script uses the `requests` library to fetch wallet data. It demonstrates setting query parameters for limit, order, and orderBy, and includes the necessary Authorization header. ```python import requests response = requests.get( "https://ht-api.coinmarketman.com/external/api/wallets", params={"limit": 50, "order": "desc", "orderBy": "perpPnl"}, headers={"Authorization": "Bearer YOUR_API_TOKEN"}, ) wallets = response.json() ``` -------------------------------- ### Ask a Question via GET Request Source: https://docs.coinmarketman.com/about Use this GET request to query the documentation index with a specific question. The response includes a direct answer and relevant excerpts. ```http GET https://docs.coinmarketman.com/webhooks.md?ask= ``` -------------------------------- ### Get Cohort Bias History (Python) Source: https://docs.coinmarketman.com/rest-api/cohorts This Python script retrieves bias history for a segment using the requests library. Ensure you have the library installed. Replace YOUR_API_TOKEN with your actual token. ```python import requests segment_id = 12 response = requests.get( f"https://ht-api.coinmarketman.com/api/external/segments/{segment_id}/bias-history", headers={ "accept": "application/json", "Authorization": "Bearer YOUR_API_TOKEN", }, params={ "start": "2026-03-03T08:10:00Z", "end": "2026-03-05T08:10:00Z", "limit": 25, }, ) result = response.json() ``` -------------------------------- ### Get Open Positions (Python) Source: https://docs.coinmarketman.com/rest-api/positions-and-market-data This Python script retrieves open perpetual positions for a specified coin. Ensure you have the 'requests' library installed. Replace 'YOUR_API_TOKEN' with your valid API token. ```python import requests response = requests.get( 'https://ht-api.coinmarketman.com/api/external/exports/coins/BTC/positions', headers={'Authorization': 'Bearer YOUR_API_TOKEN'}, allow_redirects=True ) export_data = response.json() ``` -------------------------------- ### Example Open Position Data Source: https://docs.coinmarketman.com/rest-api/positions-and-market-data This is an example of the JSON structure returned for an open position. It includes details like position ID, size, entry price, PNL, and liquidation price. ```json [ { "id": "4c16b579bc1f258ff0935e7ac44fe39518ff74b7c696cff5e21fde9c409941b5", "address": "0xa5b0edf6b55128e0ddae8e51ac538c3188401d41", "coin": "BTC", "side": "long", "dex": "main", "size": 700.0, "value": 47473300.0, "entryPrice": 68420.24587, "unrealizedPnl": -420872.1093, "funding": -52837.50306, "liquidationPrice": 27965.013971, "liquidationProgress": 1.486200527786029, "crossLeverage": 20, "isolatedLeverage": 0, "openTime": "2026-03-02T20:27:24.000Z", "profile_totalEquity": 31042191.967027, "profile_perpEquity": 31042191.967027, "profile_countOpenPositions": 2, "profile_pnl": 370800.216882, "profile_balance": 31042191.967027, "profile_perpPnlSegmentId": 9, "profile_sizeSegmentId": 7 }, { "id": "a217b26172e2d52a002049b400966a4fce10967fc1b818032033c467b3074942", "address": "0x082e843a431aef031264dc232693dd710aedca88", "coin": "BTC", "side": "long", "dex": "main", "size": 250.0, "value": 16954750.0, "entryPrice": 66819.0, "unrealizedPnl": 250000.0, "funding": -10141.52, "liquidationPrice": 1213.15, "liquidationProgress": 4.14, "crossLeverage": 20, "isolatedLeverage": 0, "openTime": "2026-02-18T22:44:00.000Z", "profile_totalEquity": 18472178.849423, "profile_perpEquity": 18472178.849423, "profile_countOpenPositions": 4, "profile_pnl": 3564355.038546, "profile_balance": 18472178.849423, "profile_perpPnlSegmentId": 8, "profile_sizeSegmentId": 7 }, { "id": "31541bc8b7cd222f71648a33cdde29b921da88d3d5e718cf97aa9afb5b35d821", "address": "0xeadc152ac1014ace57c6b353f89adf5faffe9d55", "coin": "BTC", "side": "long", "dex": "main", "size": 150.0, "value": 10172850.0, "entryPrice": 68021.0, "unrealizedPnl": -20250.0, "funding": -20433.0, "liquidationPrice": 5122.0, "liquidationProgress": 3.87, "crossLeverage": 20, "isolatedLeverage": 0, "openTime": "2026-03-12T20:13:30.000Z", "profile_totalEquity": 31186378.24408, "profile_perpEquity": 31186378.24408, "profile_countOpenPositions": 3, "profile_pnl": 2776726.133462, "profile_balance": 31186378.24408, "profile_perpPnlSegmentId": 8, "profile_sizeSegmentId": 7 }, { "id": "e4f6010060573335113a11ca8b8de322fd84f66c8512516ce5669d35113a11ca", "address": "0x6c8512516ce5669d35113a11ca8b8de322fd84f6", "coin": "BTC", "side": "long", "dex": "main", "size": 125.0, "value": 8477375.0, "entryPrice": 67011.0, "unrealizedPnl": 101000.0, "funding": -3225.0, "liquidationPrice": 1004.0, "liquidationProgress": 2.45, "crossLeverage": 20, "isolatedLeverage": 0, "openTime": "2026-01-25T18:41:54.000Z", "profile_totalEquity": 11583400.515941, "profile_perpEquity": 11583400.515941, "profile_countOpenPositions": 1, "profile_pnl": 1513793.559309, "profile_balance": 11583400.515941, "profile_perpPnlSegmentId": 8, "profile_sizeSegmentId": 7 }, { "id": "1804f9b096385c4e66ce3dec9a17e150795b9a02e3f5b0edf6b55128e0ddae8", ``` -------------------------------- ### Closed Trades Summary Response Example Source: https://docs.coinmarketman.com/rest-api/trader-and-wallet-data This JSON object represents the successful response from the 'Get Closed Trades Summary' endpoint, detailing various metrics for a wallet's closed trades. ```json { "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872", "totalTrades": 300, "wins": 206, "losses": 94, "avgDuration": 78823930, "longTrades": 289, "shortTrades": 11, "updatedAt": "2026-04-25T01:55:44.444Z" } ``` -------------------------------- ### Get Position Breakdown by Cohort (Python) Source: https://docs.coinmarketman.com/rest-api/cohorts This Python script fetches the position breakdown by cohort for a given coin. Ensure you have the 'requests' library installed. Replace YOUR_API_TOKEN with your actual API token. ```python import requests response = requests.get( 'https://ht-api.coinmarketman.com/api/external/exports/coins/BTC/position-breakdown-by-cohort', headers={'Authorization': 'Bearer YOUR_API_TOKEN'}, allow_redirects=True ) export_data = response.json() ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.coinmarketman.com/api-dashboard-how-to-use Perform an HTTP GET request to query the documentation with a specific question. Use this when the answer is not explicitly present on the page or requires clarification. ```http GET https://docs.coinmarketman.com/api-dashboard-how-to-use.md?ask= ``` -------------------------------- ### Successful Response Example Source: https://docs.coinmarketman.com/rest-api/order-data A successful response contains a downloadUrl for the snapshot file. The file itself includes detailed metrics for each order at the specified snapshot time. ```json { "metrics": [ { "snapshotTime": 1770721500000, "timestamp": 1770721498032, "height": 889785009, "address": "0x727956612a8700627451204a3ae26268bd1a1525", "coin": "0G", "side": "B", "limitPx": 0.52915, "sz": 247, "oid": 317315441547, "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [], "isPositionTpsl": false, "reduceOnly": false, "orderType": "Limit", "origSz": 247, "tif": "Alo", "cloid": "0x00000000000000000000019c46f2ae94", "status": "open", "builder": "", "builderFee": 0, "untriggered": false }, { "snapshotTime": 1770721500000, "timestamp": 1770721497697, "height": 889785009, "address": "0x31ca8395cf837de08b24da3f660e77761dfb974b", "coin": "0G", "side": "B", "limitPx": 0.52914, "sz": 1250, "oid": 317315439569, "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [], "isPositionTpsl": false, "reduceOnly": false, "orderType": "Limit", "origSz": 1250, "tif": "Alo", "cloid": "", "status": "open", "builder": "", "builderFee": 0, "untriggered": false }, { "snapshotTime": 1770721500000, "timestamp": 1770721497548, "height": 889785009, "address": "0x010461c14e146ac35fe42271bdc1134ee31c703a", "coin": "0G", "side": "B", "limitPx": 0.5291, "sz": 1188, "oid": 317315439129, "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [], "isPositionTpsl": false, "reduceOnly": false, "orderType": "Limit", "origSz": 1188, "tif": "Alo", "cloid": "", "status": "open", "builder": "", "builderFee": 0, "untriggered": false }, { "snapshotTime": 1770721500000, "timestamp": 1770721497401, "height": 889785009, "address": "0x6b8c9c4e9d52a2b6e7a4f07dfb6b0fd7d5fd2d5c", "coin": "0G", "side": "B", "limitPx": 0.52909, "sz": 500, "oid": 317315438701, "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [], "isPositionTpsl": false, "reduceOnly": false, "orderType": "Limit", "origSz": 500, "tif": "Alo", "cloid": "", "status": "open", "builder": "", "builderFee": 0, "untriggered": false }, { "snapshotTime": 1770721500000, "timestamp": 1770721497265, "height": 889785009, "address": "0x9f2b3b9e2c1a8c4f1b6d9e3a7a5c2b1e8d4c6f7a", "coin": "0G", "side": "B", "limitPx": 0.52908, "sz": 320, "oid": 317315438295, "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [], "isPositionTpsl": false, "reduceOnly": false, "orderType": "Limit", "origSz": 320, "tif": "Alo", "cloid": "", "status": "open", "builder": "", "builderFee": 0, "untriggered": false } ] } ``` -------------------------------- ### Get Builder Profile (Python) Source: https://docs.coinmarketman.com/rest-api/builder-analytics This Python script uses the requests library to fetch a builder's profile. Ensure you have the library installed and replace BUILDER ADDRESS and YOUR_API_TOKEN with the appropriate values. ```python import requests builder = "BUILDER ADDRESS" response = requests.get( f"https://ht-api.coinmarketman.com/api/external/builders/{builder}/profile", headers={ "accept": "application/json", "Authorization": "Bearer YOUR_API_TOKEN", }, ) result = response.json() ``` -------------------------------- ### Get All PnL Leaderboard (Curl) Source: https://docs.coinmarketman.com/rest-api/leaderboards Use this command to fetch the PnL leaderboard data. Ensure to replace YOUR_API_TOKEN with your actual authentication token. This example sorts by all-time PnL and limits results to 100. ```curl curl --request GET \ --url 'https://ht-api.coinmarketman.com/api/external/leaderboards/all-pnl?order=desc&orderBy=pnlAllTime&rankBy=pnlAllTime&limit=100&offset=0' \ --header 'Authorization: Bearer YOUR_API_TOKEN' ``` -------------------------------- ### Fetch Latest Open Orders Snapshot (Python) Source: https://docs.coinmarketman.com/rest-api/order-data This Python script uses the `requests` library to fetch open order data. It shows how to pass query parameters and set the `Authorization` header. Note that the example uses a placeholder for the API token. ```python import requests response = requests.get( "https://ht-api.coinmarketman.com/api/external/orders/5m-snapshots/latest", params={"limit": 50}, headers={ "Authorization": "Bearer YOUR_API_TOKEN", }, ) result = response.json() ``` -------------------------------- ### Get Closed Trades Summary (Python) Source: https://docs.coinmarketman.com/rest-api/trader-and-wallet-data This Python example shows how to retrieve closed trades summary data using the requests library. It configures the request with the wallet address and the necessary authorization header. ```python import requests response = requests.get( "https://ht-api.coinmarketman.com/api/external/closed-trades/summary", params={ "address": "0x1234567890abcdef1234567890abcdef123", }, headers={ "Authorization": "Bearer YOUR_API_TOKEN", }, ) closed_trades_summary = response.json() ``` -------------------------------- ### Query Documentation with a Question Source: https://docs.coinmarketman.com/support Use this GET request to query the documentation index with a natural language question. The response includes a direct answer and relevant excerpts. ```http GET https://docs.coinmarketman.com/hyperliquid-info-endpoints/spot.md?ask= ``` -------------------------------- ### GET /api/external/orders/5m-snapshots/{snapshotTime} Source: https://docs.coinmarketman.com/rest-api/order-data Retrieves a snapshot of all open orders at a specified `snapshotTime`. Results can be filtered by `coin`, `address`, `oid`, `start`, `end`, and `orderType`. Use `limit` for pagination and `nextCursor` to fetch subsequent pages. ```APIDOC ## GET /api/external/orders/5m-snapshots/{snapshotTime} ### Description Retrieves a snapshot of all open orders at a specified `snapshotTime`. This endpoint is useful for auditing and analyzing the state of open orders at a particular moment. ### Method GET ### Endpoint `/api/external/orders/5m-snapshots/{snapshotTime}` ### Parameters #### Path Parameters - **snapshotTime** (string) - Required - Snapshot timestamp. Must align to a 5-minute interval (e.g., `2026-04-19T11:05:00Z`) and fall within the last 30 days. Cannot be in the future. #### Query Parameters - **limit** (number) - Optional - Limit number of results returned. Default value: `100`. - **nextCursor** (string) - Optional - Pagination cursor returned by the previous response. Provide this to continue fetching the next page of results. - **coin** (string) - Optional - Market identifier (coin symbol) to filter orders by, for example `BTC`. - **address** (string) - Optional - Trader account address to filter orders by. - **oid** (string) - Optional - Filter by a specific order ID. Useful when you want to retrieve one known order from the snapshot. - **start** (string) - Optional - Filter orders created at or after this timestamp (ISO8601 format). - **end** (string) - Optional - Filter orders created at or before this timestamp (ISO8601 format). - **orderType** (string) - Optional - Restrict results to a specific order type. If omitted, all order types are returned. Allowed values: `Limit`, `Stop Limit`, `Stop Market`, `Take Profit Limit`, `Take Profit Market`. ### Request Example ```json { "example": "curl --request GET \n --url 'https://ht-api.coinmarketman.com/api/external/orders/5m-snapshots/2026-04-19T11:05:00Z?coin=BTC&limit=100' \n --header 'Authorization: Bearer YOUR_API_KEY'" } ``` ### Response #### Success Response (200) - **orders** (array) - An array of order objects representing the state of open orders at the snapshot timestamp. - **nextCursor** (string) - A cursor to paginate through the results if more data is available. #### Response Example ```json { "orders": [ { "height": 964633454, "address": "0xdef1b00b0fffeda0bf2f1adc3cd0ed4ec12c5e93", "oid": 756322353, "coin": "BTC", "side": "B", "limitPx": 21500, "sz": 0.00465, "timestamp": "2023-07-18T10:30:51.626Z", "triggerCondition": "N/A", "isTrigger": false, "triggerPx": 0, "children": [], "isPositionTpsl": false, "reduceOnly": false, "orderType": "Limit", "origSz": 0, "tif": "", "cloid": "", "status": "open", "builder": "", "builderFee": 0, "untriggered": false, "snapshotTs": "2026-04-19T11:05:00.000Z" } ], "nextCursor": "some_pagination_cursor" } ``` ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.coinmarketman.com/usage-examples Perform an HTTP GET request on the current page URL with the `ask` query parameter to dynamically query documentation. The question should be specific and in natural language. Use this when the answer is not explicitly present, for clarification, or to retrieve related sections. ```HTTP GET https://docs.coinmarketman.com/usage-examples.md?ask= ``` -------------------------------- ### API Endpoints for Volume Anomaly Detection Source: https://docs.coinmarketman.com/vibecoding/catch-volume-anomalies-before-the-price-moves These endpoints are used to pull trading fills and daily perpetual volume metrics for analyzing coin activity. Ensure the 'end' parameter for GET /fills is on the same calendar day as 'start'. ```http GET /fills?start={ISO}&end={ISO}&limit=500 IMPORTANT: end must be same calendar day as start (max 24hr window) ``` ```http GET /metrics/perp-volume?start={ISO}&end={ISO} — daily perp volume with ~1hr resolution ```