{"info":{"_postman_id":"3052daca-79cc-4d7d-bc40-31e64850176a","name":"Hibachi API","description":"<html><head></head><body><h2 id=\"welcome-to-hibachi\"><strong>Welcome to Hibachi!</strong></h2>\n<p>We provide two ways to access our APIs:</p>\n<ul>\n<li><p>REST</p>\n</li>\n<li><p>Websockets</p>\n</li>\n</ul>\n<p>The REST API provides all functionality access with easy-to-use request and response models.</p>\n<p>Websocket API provides lower latency access to real time trading and data.</p>\n<h1 id=\"key-definitions\">Key Definitions</h1>\n<ul>\n<li><p><strong>API Key</strong>: An API key is an alphanumeric string that is used to identify and authenticate an application or user to interact with API/WS endpoints. This is required for almost ALL endpoints covered in this documentation except <code>/market</code> REST and <code>/ws/market</code> WS endpoints. This key is NOT used for signing; that is done using your Private/Secret key.</p>\n</li>\n<li><p><strong>Private/Secret Key</strong>: A private key is a cryptographic code that's used to sign transactions and to prove ownership of your Hibachi Account. NOTE: This is NOT your crypto wallet’s private key. You will ONLY use this key to generate <code>signatures</code> for a <strong>subset</strong> of endpoints you are interacting with.</p>\n</li>\n<li><p><strong>Trustless Account</strong>: A trustless account is a Hibachi Account you created via directly connecting to your crypto wallet. You will generate a signature with your <code>ECDSA Private Key</code> using the ECDSA method.</p>\n</li>\n<li><p><strong>Exchange Managed Account</strong>: An exchange managed account is a Hibachi Account you created via email or social login. You will generate a signature with <code>HMAC Secret Key</code> using the HMAC method.</p>\n</li>\n<li><p><strong>Asset Quantities</strong>:All quantities on Hibachi are represented internally as <b>64-bit</b> numbers. In order to enable trading fractional quantities (e.g. 0.01 BTC), each asset on Hibachi has a specific fixed number of decimals.</p>\n<ul>\n<li><p>Example</p>\n<ul>\n<li><p><em>BTC</em> may be represented with 10 decimals</p>\n</li>\n<li><p>This means <em>1 BTC</em> is stored as <em>1 x 10^10 = 10,000,000,000</em> quantity on the exchange</p>\n</li>\n</ul>\n</li>\n<li><p>When making trades, querying positions and similar, Hibachi will still expose and expect numbers as \"real\" float strings (e.g. \"quantity: 1.0\" for 1 BTC).</p>\n</li>\n<li><p>This way, users don't need to constantly convert numbers in order to be able to reason about them. However, this quantity notation is important when:</p>\n<ul>\n<li><p>Signing any operations (trades, withdrawals, etc) since we want the traders to specify exactly what they want to trade and not leave room for misinterpretations.</p>\n</li>\n<li><p>Interacting with the Hibachi smart contracts</p>\n</li>\n</ul>\n</li>\n<li><p><strong>The number of decimals is exposed for each contract in the</strong> <strong><code>/market/exchange-info</code></strong> <strong>endpoint response under the</strong> <strong><code>underlyingDecimals</code></strong> <strong>field</strong>.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Asset Prices</strong>: Like quantities, asset prices are also <b>64-bit</b> numbers that conform to decimals. Prices are used when converting between underlying and the settlement token in a market.</p>\n<ul>\n<li><p>For example, on BTC/USDT-P a price of 100,000 may be used in a limit order to indicate that somebody is willing to sell BTC for 100,000 USDT per BTC. Price is always denoted in units of the settlementAsset.</p>\n</li>\n<li><p>Since both the underlying and settlement assets have unique quantity decimals, the price is stored in the difference between both decimals (settlementDecimals - underlyingDecimals).</p>\n</li>\n<li><p>In order to support higher resolution of prices, an additional price multiplier of 2^32 is used to represent prices as fixed-point decimals with 32 bits after the decimal point.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h1 id=\"pre-requisites\">Pre-requisites</h1>\n<ol>\n<li><p>You make a Deposit to your account. (Your Account ID will not be generated until your first deposit; this ID is required for a lot of endpoints. We currently ONLY support three assets, and any other currencies deposited will not be refunded:</p>\n<ol>\n<li><p><strong>USDT</strong> on <strong>Arbitrum One</strong></p>\n</li>\n<li><p><strong>USDC</strong> on <strong>Arbitrum One</strong></p>\n</li>\n<li><p><strong>USDC</strong> on <strong>Base Mainnet</strong></p>\n</li>\n</ol>\n</li>\n</ol>\n<ul>\n<li>Trustless Wallet: Open the \"Wallet Balance\" Dropdown, and select \"Deposit\". First you need to <code>Unlock</code> your wallet with proper allowance, then you can enter the amount you would want to deposit to your Hibachi Account.</li>\n</ul>\n<p><img src=\"https://content.pstmn.io/1d4919df-cf7d-4140-a7ef-89681ec1594e/U2NyZWVuc2hvdCAyMDI0LTA4LTI3IGF0IDIwLjI4LjQ2LnBuZw==\" width=\"236\" height=\"364\"><img src=\"https://content.pstmn.io/8f96f68f-5129-40b0-8241-928a7975106c/U2NyZWVuc2hvdCAyMDI0LTA4LTI3IGF0IDIwLjI5LjA5LnBuZw==\" width=\"236\" height=\"364\"></p>\n\n<ul>\n<li>Exchange Managed Wallet:Open the \"Wallet Balance\" Dropdown, and select \"Deposit\" to reveal wallet deposit address, then send USDT from any of your crypto wallets that holds USDT to this deposit address</li>\n</ul>\n<img src=\"https://lh7-rt.googleusercontent.com/docsz/AD_4nXcDRnIrJRG8oHpyRHENvZifUjsAOzQ8zLeODmpQpUR8eoLlX2S1vJoVHmEmn1xsd1kwzrioWGtATFcLAS9q3qoFVbyiDsYfZdzOpMD5i0CNMndt3qUtAwzEddstl-oHi_RBctyQIi2jmbeIJZ9dWm80zhKw?key=w9drbmV-tBtimnc8NGitcA\" width=\"236\" height=\"364\">\n\n<h1 id=\"getting-started\">Getting Started</h1>\n<h4 id=\"1-create-an-api-key\">1. Create an API Key</h4>\n<ul>\n<li><p>After you login to your Hibachi Account from the UI, click on the gear button on the top right corner, then select <strong>API Keys</strong></p>\n</li>\n<li><p>Click on <strong>Create API Key</strong>, then follow below definition to choose the correct setting for your API Key, and click on <strong>Generate</strong></p>\n<ul>\n<li><p><strong>Select Account:</strong> This is to choose the account you want to associate with this API Key. Note you cannot use an API Key you created to access another account you own.</p>\n</li>\n<li><p><strong>Name of the API Key:</strong> a name you want to associate with this API Key</p>\n</li>\n<li><p><strong>API Restrictions:</strong> you can choose if this API Key will have <code>read-only</code> or <code>read-write</code> permissions. By default the <code>read-only</code> permission is selected.</p>\n<ul>\n<li><p><strong><code>read-write</code></strong> <strong>permissions:</strong></p>\n<ul>\n<li><p><strong>Trading:</strong> This permission is required to place orders</p>\n</li>\n<li><p><strong>Withdraws:</strong> This permission will allow the API key to withdraw funds from the exchange account to outside destinations</p>\n</li>\n<li><p><strong>Transfers</strong>: This permission will allow the transfer of funds to other sub-accounts related to the main account. This will <strong>not</strong> allow transferring to other users OR withdrawing unless the withdraw permission is present</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p>On the next page, <strong>save the API Key and Private Key to a safe vault</strong> (e.g password manager etc). You will <strong>ONLY</strong> be able to see the Private Key during generation, so make sure you save it before exiting the page</p>\n</li>\n<li><p>Click on <strong>Next</strong>, save below information that will be needed for API Endpoints interaction together with your API Key</p>\n<ul>\n<li><p><strong>Account ID</strong>: you will see `ID: XXX` below your API Key Name</p>\n</li>\n<li><p><strong>Public Key:</strong></p>\n</li>\n</ul>\n</li>\n</ul>\n<img src=\"https://content.pstmn.io/097fe559-3255-409d-bf0b-f73b76944f7c/U2NyZWVuc2hvdCAyMDI0LTA4LTI1IGF0IDE1LjQ2LjA5LnBuZw==\" width=\"251\" height=\"352\">\n\n<h4 id=\"2-api-authorization\">2. API Authorization</h4>\n<ul>\n<li>For every endpoint that <strong>requires authorization</strong> (i.e. everything except /market or /ws/market), add the header <code>Authorization:</code></li>\n</ul>\n<h1 id=\"signing\">Signing</h1>\n<ul>\n<li><p>Signing is <strong>ONLY</strong> required for the <strong>write-operations listed below</strong>. GET requests do not require a signature. Signing requires using a very specific payload structure depending on the operation. If you do not use <strong>the exact order and padding below your requests will fail signature verification</strong>. Please refer to <a href=\"https://github.com/hibachi-xyz/hibachi-example-js\">this</a> public js repo for examples.</p>\n<ul>\n<li><p><strong>Capital: Withdraw and Transfer</strong></p>\n<ul>\n<li><p><strong>Withdraw</strong></p>\n<ul>\n<li><p>You must sign a payload made of the following fields, padded to their respective sizes, and in the following order. This signed payload needs to be 32 bytes and be passed into the <code>signature</code>field</p>\n<ul>\n<li><p><code>asset_id</code>: 4 bytes</p>\n</li>\n<li><p><code>quantity</code>: 8 bytes</p>\n</li>\n<li><p><code>max_fees</code>: 8 bytes</p>\n</li>\n<li><p><code>withdrawal_address</code>: 20 bytes</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>Transfer</strong></p>\n<ul>\n<li><p>You must sign a payload comprising the following fields and pass them into the <code>signature</code> field</p>\n<ul>\n<li><p><code>nonce</code>: 8 bytes</p>\n</li>\n<li><p><code>asset_id</code>: 4 bytes</p>\n</li>\n<li><p><code>quantity</code>: 8 bytes</p>\n</li>\n<li><p><code>dst_account_public_key</code>: 64 bytes</p>\n</li>\n<li><p><code>max_fees_percent</code>: 8 bytes</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>Trade</strong></p>\n<ul>\n<li><p>All write operations (place orders, edit orders, cancel orders requests) require signatures.</p>\n<ul>\n<li><p><strong>Trustless accounts</strong>: these signatures use ECDSA with the private key provided per API Key.This is a string of <strong>65 bytes including the recovery ID</strong>. Depending on what library you're using, the ECDSA signature should give you a recovery ID byte as well. You then concatenate that bit as the 65th byte.</p>\n</li>\n<li><p><strong>Exchange-managed accounts</strong>,:these signatures use HMAC with the private key provided per API Key.</p>\n</li>\n<li><p>Each operation has a specific method for generating the signature digest that needs to be signed. Each operation is detailed below. A<strong>ll numbers using the big endian byte ordering.</strong></p>\n<ul>\n<li><p>Place/Edit Order</p>\n<ul>\n<li><p><strong>Structure</strong>: The payload for placing or editing orders consists of the following. For editing an order, you can use either the <code>orderId</code>, <code>nonce</code> , or <code>clientId</code> field to refer to the order.</p>\n</li>\n<li><p><strong>Nonce: 8 bytes</strong></p>\n<ul>\n<li><p>Current timestamp serving as a unique identifier for your order</p>\n</li>\n<li><p>Nonce needs to be a milli-second or micro-second unix timestamp within +- 15 seconds of the current time</p>\n</li>\n<li><p>Nonce needs to be unique per subaccount (if you send two orders with the same nonce from the same account, they will be rejected by our API)</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Contract ID: 4 bytes</strong></p>\n</li>\n<li><p><strong>Quantity: 8 bytes -</strong> See section on asset quantities for how these are computed</p>\n</li>\n<li><p><strong>Side: 4 bytes - Ask: 0 ; Bid: 1</strong></p>\n</li>\n<li><p><strong>Price (</strong><em><strong>Optional</strong></em><strong>): 8 bytes</strong></p>\n<ul>\n<li><p>Only applicable for limit order</p>\n</li>\n<li><p>See section on asset prices for how these are computed</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Max Fees Percent: 8 bytes</strong></p>\n<ul>\n<li><p>Maximum fees allowed for order operation</p>\n</li>\n<li><p>Denoted in basis points (e.g. 20 =&gt; 0.2% fee)</p>\n</li>\n<li><p>We can get fee information from /market/exchange-info.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Creation Deadline (</strong><em><strong>Optional</strong></em><strong>)</strong></p>\n<ul>\n<li><p>If our system can not place the order by the deadline, the order will be rejected</p>\n</li>\n<li><p>This is useful if you are concerned about high network or system latency.</p>\n</li>\n<li><p>The <code>creationDeadline</code> field should have the number of seconds since the Unix epoch as a floating point number</p>\n</li>\n<li><p>For trigger orders, the creation deadline is applied to the order when it is triggered.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Trigger Price (</strong><em><strong>Optional</strong></em><strong>)</strong></p>\n<ul>\n<li><p><strong>If present, indicates that this is a trigger order (also called stop order)</strong> that should be sent when the market price reaches the trigger price</p>\n</li>\n<li><p>When modifying trigger orders:</p>\n<ul>\n<li><p>If order has been triggered, you should not set the <code>updatedTriggerPrice</code> field. You can modify the order like a regular limit order</p>\n</li>\n<li><p>If the order has not been triggered yet, you should set the <code>updatedTriggerPrice</code> field with the new trigger price</p>\n</li>\n<li><p>If the order has not been triggered yet, you can modify market orders to limit orders and vice-versa</p>\n<ul>\n<li><p>If updatedPrice is present, the order will be modified to a limit order with that price</p>\n</li>\n<li><p>If updatedPrice is absent, the order will be modified to a market order</p>\n</li>\n</ul>\n</li>\n<li><p>When triggered, the order ends up at the back of the queue for the price level</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p>Example</p>\n<ul>\n<li>Let's assume we want to place the following order and contract information from <code>/exchange-info</code></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">//order  \n{  \n    \"symbol\": \"BTC/USDT-P\",  \n    \"side\": \"ASK\",  \n    \"nonce\": 1714701600000000,  \n    \"quantity\": \"1 BTC\",  \n    \"price\": \"100,000 USDT\",  \n    \"max_fees\": \"0.0005\",  //5 basis points\n}  \n//contract info from /exchange-info  \n{  \n    \"symbol\": \"BTC/USDT-P\",  \n    \"id\": 2,  \n    \"underlyingDecimals\": 10,  \n    \"underlyingSymbol\": \"BTC\",  \n    \"settlementDecimals\": 6,  \n    \"settlementSymbol\": \"USDT\",\n    \"status\":\"LIVE\"\n}\n\n</code></pre>\n<p>We can now compute quantity and price:</p>\n<ul>\n<li><p>Quantity: <code>1 BTC x 10^10 = 10,000,000,000</code> since <code>underlyingDecimals</code>: 10</p>\n</li>\n<li><p><strong>Price:</strong> <code>100,000 USDT x 2^32 x 10^(6 - 10 = -4) = 42,949,672,960</code> since <code>priceMultiplier</code>: <code>2^32</code> and <code>settlementDecimals</code> - <code>underlyingDecimals</code> = <code>6 - 10 = -4</code></p>\n</li>\n<li><p>Using these numbers, we can compute the elements of the buffer as**:**</p>\n<ul>\n<li><p>Nonce: <code>1714701600000000</code> =&gt; <code>0x0006178313c38800</code></p>\n</li>\n<li><p>ContractId: <code>2</code> =&gt; <code>0x00000002</code></p>\n</li>\n<li><p>Quantity: <code>10000000000</code> =&gt; <code>0x00000002540be400</code></p>\n</li>\n<li><p>Side: <code>ASK</code> =&gt; <code>0x00000000</code></p>\n</li>\n<li><p>Price: <code>42949672960</code> =&gt; <code>0x0000000a00000000</code></p>\n</li>\n<li><p>Fees: For fixed fees like withdraw/deposit, we should use fees * 10^6, one example: 1.23=&gt;1230000=&gt;0x00000000012C4B00. For rate fees, we should use rate fees * 10^8, one example: 0.0005=&gt;5000=&gt;0x0000000000001388</p>\n</li>\n</ul>\n</li>\n<li><p>Concatenating these elements gives us a buffer of: <code>0x0006178313c388000000000200000002540be400000000000000000a000000000000000000001388</code></p>\n</li>\n<li><p>If exchange managed, we would sign this order using HMAC</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const hmacSignature = crypto\n   .createHmac('sha256', 'YOUR-SECRET-KEY')\n   .update(buffer)\n   .digest('hex');\n\n</code></pre>\n<ul>\n<li>If trustless account, we would sign using ECDSA</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const msgHash = ethers.sha256(buffer).slice(2);\nconst ecdsaSignature = ec.sign(msgHash, 'hex', { canonical: true });\n\n</code></pre>\n<ul>\n<li><p><strong>Cancel Order:</strong> For order cancellations:</p>\n<ul>\n<li><p>If you are using <code>orderId</code>, the payload will be the <code>orderId</code> as a 64-bit integer.</p>\n<ul>\n<li><p>For example, the place order operation above could result in a response payload like <code>{ \"order_id\":\"579183763093760000\"}</code></p>\n</li>\n<li><p>If we wanted to cancel this order, we'd need to sign 579183763093760000 as 8 bytes, which would map to 0x0809ac905ae0a800</p>\n</li>\n</ul>\n</li>\n<li><p>If you are using <code>clientId</code>, the payload will be the ASCII encoding of <code>clientId</code>.</p>\n<ul>\n<li>If the <code>clientId</code> is \"hello\", the payload will be <code>0x68656c6c6f</code></li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>Cancel all orders</strong>: You can also cancel all orders by sending an HTTP delete to the /trade/orders endpoint with the account ID, a nonce, and signature signed on the nonce (64-bit integer)</p>\n</li>\n</ul>\n<h1 id=\"rest-api\">REST API</h1>\n<p>You can find documentation for all Hibachi REST API on this page.</p>\n<p>We have 2 different categories of API:</p>\n<ul>\n<li><p>Account API: for account specific query and action</p>\n</li>\n<li><p>Market API: for market data and metadata</p>\n</li>\n</ul>\n<h1 id=\"websocket-api\">Websocket API</h1>\n<p>For Websocket API, please use this <a href=\"https://www.postman.com/hibachi-xyz/hibachi-public/collection/6707f03b7c82ad6d2f10477c\">link</a> to access our public Postman workspace.</p>\n<p>You can find the detailed documentation this way:</p>\n<ol>\n<li><p>Select \"Websockets API\" and choose one of the API endpoint.</p>\n</li>\n<li><p>Click the \"Documentation\" button on top right.</p>\n</li>\n</ol>\n<h1 id=\"quick-links\">Quick Links</h1>\n<ol>\n<li><p>Hibachi UI: <a href=\"https://hibachi.xyz\">https://hibachi.xyz</a></p>\n</li>\n<li><p>Use <a href=\"https://api-doc.hibachi.xyz/#183981da-8df5-40a0-a155-da15015dd536\">Exchange Info API</a> to get the list of future contracts</p>\n</li>\n<li><p>Use <a href=\"https://api-doc.hibachi.xyz/#00f6d5ad-5275-41cb-a1a8-19ed5d142124\">Trade Order API</a> to place orders</p>\n</li>\n<li><p>Use <a href=\"https://api-doc.hibachi.xyz/#69aafedb-8274-4e21-bbaf-91dace8b8f31\">Account Info API</a> to get account status</p>\n</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Key Definitions","slug":"key-definitions"},{"content":"Pre-requisites","slug":"pre-requisites"},{"content":"Getting Started","slug":"getting-started"},{"content":"Signing","slug":"signing"},{"content":"REST API","slug":"rest-api"},{"content":"Websocket API","slug":"websocket-api"},{"content":"Quick Links","slug":"quick-links"}],"owner":"38930884","collectionId":"3052daca-79cc-4d7d-bc40-31e64850176a","publishedId":"2sAXxQfD4P","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-10T16:16:37.000Z"},"item":[{"name":"Account API","item":[{"name":"Capital","item":[{"name":"/capital/balance","id":"d0657874-17ae-4b36-a45d-d9ffe6790244","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api-staging.hibachi.xyz/capital/balance?accountId=<accountId>","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the balance of your account.</p>\n<p>The returned balance is your net equity which includes unrealized PnL.</p>\n<h4 id=\"required-request-parameter\"><strong>Required Request Parameter:</strong></h4>\n<p><strong>accountId:</strong> The account ID can be found on the UI details page of each API Key. Your Account ID will not be generated until your first deposit</p>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["capital","balance"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"accountId","value":"<accountId>"}],"variable":[]}},"response":[{"id":"e888f494-f227-4ea6-bf91-0094e8b4fb30","name":"Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api.hibachi.xyz/capital/balance?accountId=128","protocol":"https","host":["api","hibachi","xyz"],"path":["capital","balance"],"query":[{"key":"accountId","value":"128"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:35:38 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=INHxjvy6MTf2KjWxN55JGMToiGcvZUO5a5JV3vwQvnAhbxdstI8KEI+mYxgFyt6zikITzLVyteTNAx40S0/hl/nI5peVmzcJlkc/0vIep7R5LVkP5uIwOT8kYqmY; Expires=Tue, 16 Apr 2024 19:35:38 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=INHxjvy6MTf2KjWxN55JGMToiGcvZUO5a5JV3vwQvnAhbxdstI8KEI+mYxgFyt6zikITzLVyteTNAx40S0/hl/nI5peVmzcJlkc/0vIep7R5LVkP5uIwOT8kYqmY; Expires=Tue, 16 Apr 2024 19:35:38 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871cf10139d353ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"balance\": \"1998766.543274\"\n}"}],"_postman_id":"d0657874-17ae-4b36-a45d-d9ffe6790244"},{"name":"/capital/history","id":"35125e3f-d154-4bfd-8276-a48bb1c62020","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api-staging.hibachi.xyz/capital/history?accountId=<accountId>","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the deposit and withdraw history of your account.</p>\n<p>It will return most recent up to 100 deposit and 100 withdraw.</p>\n<h4 id=\"required-request-parameter\"><strong>Required Request Parameter:</strong></h4>\n<p><strong><code>accountId</code></strong> : The account ID can be found on the UI details page of each API Key. Your Account ID will not be generated until your first deposit; this ID is required for a lot of endpoints</p>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["capital","history"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"accountId","value":"<accountId>"}],"variable":[]}},"response":[{"id":"b84c9fea-b44f-43be-8b05-94a54c403557","name":"Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api.hibachi.xyz/capital/history?accountId=128","protocol":"https","host":["api","hibachi","xyz"],"path":["capital","history"],"query":[{"key":"accountId","value":"128"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 11 Apr 2024 19:41:42 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=3zJoqPfrFQZn0taYNnwOihTPZkTavgVVGC/H49JBRdnX64rxnu6maKnUICBLPZgph0B7cq29lpCMe1AAs+WBOwfExW3R0hFjOit9A+mcmLVzusQ1OaEZNhGx8NAH; Expires=Thu, 18 Apr 2024 19:41:42 GMT; Path=/","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"Set-Cookie","value":"AWSALBCORS=3zJoqPfrFQZn0taYNnwOihTPZkTavgVVGC/H49JBRdnX64rxnu6maKnUICBLPZgph0B7cq29lpCMe1AAs+WBOwfExW3R0hFjOit9A+mcmLVzusQ1OaEZNhGx8NAH; Expires=Thu, 18 Apr 2024 19:41:42 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"Set-Cookie","value":"__cf_bm=Z1bF2_DUE8XL6E5YD99W3zzCnb6X0r9nTGFUfHDtayg-1712864502-1.0.1.1-yS3mqnYuZwyWrXOYUGKchEVZD7Iz4OtJPAQNBX74e6fbq_gkcNSrB0Sd5YsKELqbWGzABiUlSOcmlvAiZGn1Tg; path=/; expires=Thu, 11-Apr-24 20:11:42 GMT; domain=.hibachi.xyz; HttpOnly; Secure; SameSite=None","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"872d74a409f753ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"transactions\": [\n        {\n            \"assetId\": 1,\n            \"blockNumber\": 0,\n            \"id\": 10,\n            \"quantity\": \"20.000000\",\n            \"status\": \"completed\",\n            \"timestamp\": 1728510232,\n            \"transactionHash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n            \"transactionType\": \"deposit\"\n        },\n        {\n            \"assetId\": 1,\n            \"id\": 3,\n            \"quantity\": \"3.061224\",\n            \"status\": \"completed\",\n            \"timestamp\": 1728510702,\n            \"transactionType\": \"withdrawal\",\n            \"withdrawalAddress\": \"0x0000000000000000000000000000000000000000\"\n        },\n        {\n            \"assetId\": 1,\n            \"id\": 13,\n            \"quantity\": \"11.997367\",\n            \"srcAccountId\": 134,\n            \"srcAddress\": \"0x0000000000000000000000000000000000000000\",\n            \"status\": \"completed\",\n            \"timestamp\": 1728510867,\n            \"transactionType\": \"transfer-in\"\n        },\n        {\n            \"assetId\": 1,\n            \"id\": 7,\n            \"quantity\": \"10.000000\",\n            \"receivingAccountId\": 134,\n            \"receivingAddress\": \"0x0000000000000000000000000000000000000000\",\n            \"status\": \"completed\",\n            \"timestamp\": 1728510375,\n            \"transactionType\": \"transfer-out\"\n        }\n    ]\n}"}],"_postman_id":"35125e3f-d154-4bfd-8276-a48bb1c62020"},{"name":"/capital/withdraw","id":"6421625d-3e45-45fa-be9b-d2a0e780c090","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": 140,\n    \"coin\": \"USDT\",\n    \"withdrawAddress\": \"0000000000000000000000000000000000000000\",\n    \"network\": \"arbitrum\",\n    \"quantity\": \"2.0113592\",\n    \"maxFees\": \"0.0113592\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/capital/withdraw","description":"<h4 id=\"usage\">Usage</h4>\n<p>Submit a withdraw request.</p>\n<h4 id=\"signing\">Signing</h4>\n<p>Use below field to sign the message and pass it in to <code>signature</code> field (65 bytes). Refer to the <a href=\"https://documenter.getpostman.com/view/28403799/2sA3BgAFYV#signing\">Signing section</a> for more context</p>\n<ul>\n<li><p><code>assetId</code> (4 bytes)</p>\n</li>\n<li><p><code>quantity</code> (8 bytes): should be no more than <code>maximalWithdraw</code> returned by <code>/trade/account/info</code> endpoint, otherwise it will be rejected.</p>\n</li>\n<li><p><code>maxFees</code> (8 bytes): should be at least returned by /market/exchange-info endpoint, otherwise it will be rejected.</p>\n</li>\n<li><p><code>withdrawalAddress</code> (20 bytes)</p>\n</li>\n</ul>\n<h4 id=\"request-body-payload\">Request Body Payload</h4>\n<p>Required Fields</p>\n<ul>\n<li><p><code>accountId</code></p>\n</li>\n<li><p><code>coin</code></p>\n</li>\n<li><p><code>withdrawAddress</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>signature</code></p>\n</li>\n</ul>\n<p><strong>NOTE</strong>: Self Claim Option for trustless account: You can replace <code>withdrawalAddress</code> with <code>selfWithdrawal</code> , but you will need to follow our ABI to make direct contract interaction for claim the withdraw. Currently, the only <code>coin</code> we support is <code>USDT</code>.</p>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["capital","withdraw"],"host":["https://api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"87ac1b64-f792-442a-b4df-1d0f890d36ce","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"body":{"mode":"raw","raw":"{\n    \"accountId\": 140,\n    \"coin\": \"USDT\",\n    \"withdrawAddress\": \"0000000000000000000000000000000000000000\",\n    \"network\": \"arbitrum\",\n    \"quantity\": \"2.0113592\",\n    \"maxFees\": \"0.0113592\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.hibachi.xyz/capital/withdraw"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:37:32 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Content-Length","value":"2","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=G88/PnZwHua1H7dMaRanpZ5yvwNtsYJb8jcaOkuXlgzACgj2eBOa+9zs2geMqUGLIiIQZ73anaSY+6ZzoqFpd7DyteZlCPGv4buG2i9ug08kvh2g92C7VTXfc8nE; Expires=Tue, 16 Apr 2024 19:37:32 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=G88/PnZwHua1H7dMaRanpZ5yvwNtsYJb8jcaOkuXlgzACgj2eBOa+9zs2geMqUGLIiIQZ73anaSY+6ZzoqFpd7DyteZlCPGv4buG2i9ug08kvh2g92C7VTXfc8nE; Expires=Tue, 16 Apr 2024 19:37:32 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871cf3cb7e2253ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"6421625d-3e45-45fa-be9b-d2a0e780c090"},{"name":"/capital/transfer","id":"375b600c-971b-4ed5-b61c-d5fb798720c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": 140,\n    \"coin\": \"USDT\",\n    \"fees\": \"0\",\n    \"nonce\": 1728515344533,\n    \"quantity\": \"1\",\n    \"dstPublicKey\": \"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/capital/transfer","description":"<h4 id=\"usage\">Usage</h4>\n<p>Submit a withdraw request.</p>\n<h4 id=\"signing\">Signing</h4>\n<p>Use below field to sign the message and pass it in to <code>signature</code> field (65 bytes). Refer to the <a href=\"https://documenter.getpostman.com/view/28403799/2sA3BgAFYV#signing\">Signing section</a> for more context</p>\n<ul>\n<li><p><code>nonce</code> (8 bytes)</p>\n</li>\n<li><p><code>assetId</code> (4 bytes)</p>\n</li>\n<li><p><code>quantity</code> (8 bytes)</p>\n</li>\n<li><p><code>dstPublicKey</code> (20 bytes)</p>\n</li>\n<li><p>maxFeesPercent<code>(8 bytes), should be at least returned value at /market/exchange-info endpoint, otherwise, it will be rejected.</code></p>\n</li>\n</ul>\n<h4 id=\"required-request-body\">Required Request Body</h4>\n<ul>\n<li><p><code>accountId</code></p>\n</li>\n<li><p><code>coin</code></p>\n</li>\n<li><p><code>fees</code></p>\n</li>\n<li><p><code>nonce</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>receivingAddress</code></p>\n</li>\n<li><p><code>signature</code></p>\n</li>\n</ul>\n<p>Currently, the only <code>coin</code> we support is <code>USDT</code>.</p>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["capital","transfer"],"host":["https://api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"cd3b3f36-3a0a-41f4-b904-7dad061fe01f","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"body":{"mode":"raw","raw":"{\n    \"accountId\": 140,\n    \"coin\": \"USDT\",\n    \"fees\": \"0\",\n    \"nonce\": 1728515344533,\n    \"quantity\": \"1\",\n    \"dstPublicKey\": \"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.hibachi.xyz/capital/transfer"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:37:32 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Content-Length","value":"2","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=G88/PnZwHua1H7dMaRanpZ5yvwNtsYJb8jcaOkuXlgzACgj2eBOa+9zs2geMqUGLIiIQZ73anaSY+6ZzoqFpd7DyteZlCPGv4buG2i9ug08kvh2g92C7VTXfc8nE; Expires=Tue, 16 Apr 2024 19:37:32 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=G88/PnZwHua1H7dMaRanpZ5yvwNtsYJb8jcaOkuXlgzACgj2eBOa+9zs2geMqUGLIiIQZ73anaSY+6ZzoqFpd7DyteZlCPGv4buG2i9ug08kvh2g92C7VTXfc8nE; Expires=Tue, 16 Apr 2024 19:37:32 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871cf3cb7e2253ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"375b600c-971b-4ed5-b61c-d5fb798720c1"},{"name":"/capital/deposit-info","id":"6fa35580-3d45-4b59-854d-c9326db06af5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api-staging.hibachi.xyz/capital/deposit-info?accountId=<accountId>&publicKey=0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get deposit address for a given account. Sending funds to this address allows for</p>\n<h4 id=\"required-request-parameter\"><strong>Required Request Parameter:</strong></h4>\n<p>**<code>publicKey:</code>**The public key of the account</p>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["capital","deposit-info"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"accountId","value":"<accountId>"},{"key":"publicKey","value":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}],"variable":[]}},"response":[{"id":"08ed1945-ed51-4dd9-82fb-18a8ec1875cd","name":"/capital/deposit-info","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api.hibachi.xyz/capital/deposit-info?publicKey=0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","protocol":"https","host":["api","hibachi","xyz"],"path":["capital","deposit-info"],"query":[{"key":"publicKey","value":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\"depositAddressEvm\":\"0x0000000000000000000000000000000000000000\"}"}],"_postman_id":"6fa35580-3d45-4b59-854d-c9326db06af5"}],"id":"17049f78-cfc7-4057-9019-3926a54f8540","description":"<h2 id=\"deposit-usdt\">Deposit USDT</h2>\n<p>An internal account is not created for you until a deposit is made.</p>\n<p>Open the \"Wallet Balance\" Dropdown, and select \"Deposit\" to reveal wallet deposit address. We currently only support three assets:</p>\n<ul>\n<li><p><strong>USDT</strong> on <strong>Arbitrum One</strong></p>\n</li>\n<li><p><strong>USDC</strong> on <strong>Arbitrum One</strong></p>\n</li>\n<li><p><strong>USDC</strong> on <strong>Base Mainnet</strong></p>\n</li>\n</ul>\n<h2 id=\"withdraw\">Withdraw</h2>\n<p>To withdraw funds, you can use the <code>/capital/withdraw</code> endpoint.</p>\n<ul>\n<li><p>Triggers a withdraw request for the exchange to make funds available for deposit.</p>\n</li>\n<li><p>If accepted, the withdraw request will be submitted in the next ZK proof batch (10-30min) at which point the funds will become available for claiming.</p>\n</li>\n<li><p>For self-withdrawals (zero-fee), the user will need to claim the funds themselves.</p>\n</li>\n<li><p>For auto-withdrawals (gas fee excluded) the exchange will trigger the blockchain transaction for the funds to get claimed to the withdraw_address provided in the original request.</p>\n</li>\n</ul>\n<p>You must sign a payload comprising the following fields and pass that in the <code>signature</code> field</p>\n<ol>\n<li><p><code>assetId</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>maxFees</code></p>\n</li>\n<li><p><code>withdrawalAddress</code></p>\n</li>\n</ol>\n<h2 id=\"transfer\">Transfer</h2>\n<p>To transfer funds, you can use the <code>/capital/transfer</code> endpoint.</p>\n<ul>\n<li><p>Tranfers funds between accounts within the system (no withdrawals).</p>\n</li>\n<li><p>Transfers are instant and can be used right away by the receiving account.</p>\n</li>\n</ul>\n<p>You must sign a payload comprising the following fields and pass that in the <code>signature</code> field</p>\n<ol>\n<li><p><code>nonce</code></p>\n</li>\n<li><p><code>assetId</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>dstPublicKey</code></p>\n</li>\n<li><p><code>maxFees</code></p>\n</li>\n</ol>\n","_postman_id":"17049f78-cfc7-4057-9019-3926a54f8540","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}}},{"name":"Authentication","item":[],"id":"f1e55d83-5587-4c31-bff2-e972590a16ad","description":"<p>You will need to use API keys for accessing Hibachi APIs</p>\n<p>Generate API key from settings dropdown, create one with all restrictions enabled with <code>read-write</code> access.</p>\n<img src=\"https://content.pstmn.io/95784479-8b3b-4bad-b98c-696c1215051d/U2NyZWVuc2hvdCAyMDI0LTA0LTI5IGF0IDIuMjYuNTTigK9QTS5wbmc=\" alt=\"API%20key%20generation\" width=\"244\" height=\"364\" />\n\n<p>After generation, you can view the details of the API key</p>\n<img src=\"https://content.pstmn.io/ac89342b-2cfb-4a9e-9bbc-4bb5d99605b1/U2NyZWVuc2hvdCAyMDI0LTA0LTI5IGF0IDIuMjcuMjjigK9QTS5wbmc=\" alt=\"API%20key%20details\" width=\"286\" height=\"344\" />\n\n<p>Click <code>Copy</code> on API Key. It will be used in authorization header for API access.</p>\n<p>If you provisioned an exchange-managed account, you need to use <code>Private Key</code> for <code>HMAC</code> signing of your request on signature required endpoints.</p>\n","_postman_id":"f1e55d83-5587-4c31-bff2-e972590a16ad","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}}},{"name":"Trade","item":[{"name":"/trade/account/info","id":"69aafedb-8274-4e21-bbaf-91dace8b8f31","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":""}],"url":"https://api-staging.hibachi.xyz/trade/account/info?accountId=<accountId>","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get account information/details</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li>accountId</li>\n</ul>\n<h4 id=\"key-response-fields\">Key Response Fields</h4>\n<ul>\n<li><p><code>balance</code> (net equity) and <code>maximalWithdraw</code></p>\n</li>\n<li><p>(collateral) <code>assets</code></p>\n</li>\n<li><p><code>positions</code></p>\n</li>\n<li><p>risk related summary: <code>totalOrderNotional</code>, <code>totalPositionNotional</code>, <code>totalUnrealizedPnl</code>, <code>initialMargin</code>, <code>maintenanceMargin</code></p>\n</li>\n<li><p>The <code>entryNotional</code> in <code>positions</code> is: entry price multiply by quantity.</p>\n</li>\n<li><p><code>totalOrderNotional</code> does not count orders that will reduce your position.</p>\n</li>\n<li><p><code>leverages</code>: the custom leverage settings set by <code>/trade/account/leverage</code> endpoint.</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","account","info"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"accountId","value":"<accountId>"}],"variable":[]}},"response":[{"id":"686fd9d3-0a22-410e-aaad-b01360506e7b","name":"Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api.hibachi.xyz/trade/account/info?accountId=128","protocol":"https","host":["api","hibachi","xyz"],"path":["trade","account","info"],"query":[{"key":"accountId","value":"128"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:38:36 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=GFfRXt0F8Q4UulrTjhYVAj0kVcNOFfkFOUuFfmkCXPZnQLbK5G1IIO2mQW5dfI1S4892TzJXfZlLcblzE+X08gHTm7iw5nvXkyFDwrDgr5M92Bx5aBD4Vgg7+5PQ; Expires=Tue, 16 Apr 2024 19:38:36 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=GFfRXt0F8Q4UulrTjhYVAj0kVcNOFfkFOUuFfmkCXPZnQLbK5G1IIO2mQW5dfI1S4892TzJXfZlLcblzE+X08gHTm7iw5nvXkyFDwrDgr5M92Bx5aBD4Vgg7+5PQ; Expires=Tue, 16 Apr 2024 19:38:36 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871cf558984f53ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"assets\": [\n        {\n            \"quantity\": \"14.130626\",\n            \"symbol\": \"USDT\"\n        }\n    ],\n    \"balance\": \"14.186087\",\n    \"initialMargin\": \"0.000000\",\n    \"maintenanceMargin\": \"0.000000\",\n    \"leverages\": [\n        {\n            \"initialMarginRate\": \"0.600000\",\n            \"symbol\": \"BTC/USDT-P\"\n        },\n        {\n            \"initialMarginRate\": \"0.750000\",\n            \"symbol\": \"ETH/USDT-P\"\n        }\n    ],\n    \"maximalWithdraw\": \"4.152340\",\n    \"numFreeTransfersRemaining\": 96,\n    \"positions\": [\n        {\n            \"direction\": \"Short\",\n            \"entryNotional\": \"10.302213\",\n            \"notionalValue\": \"10.225008\",\n            \"quantity\": \"0.004310550\",\n            \"symbol\": \"ETH/USDT-P\",\n            \"unrealizedFundingPnl\": \"0.000000\",\n            \"unrealizedTradingPnl\": \"0.077204\"\n        },\n        {\n            \"direction\": \"Short\",\n            \"entryNotional\": \"2.000016\",\n            \"notionalValue\": \"1.999390\",\n            \"quantity\": \"0.0000328410\",\n            \"symbol\": \"BTC/USDT-P\",\n            \"unrealizedFundingPnl\": \"0.000000\",\n            \"unrealizedTradingPnl\": \"0.000625\"\n        },\n        {\n            \"direction\": \"Short\",\n            \"entryNotional\": \"2.000015\",\n            \"notionalValue\": \"2.022384\",\n            \"quantity\": \"0.01470600\",\n            \"symbol\": \"SOL/USDT-P\",\n            \"unrealizedFundingPnl\": \"0.000000\",\n            \"unrealizedTradingPnl\": \"-0.022369\"\n        }\n    ],\n    \"totalOrderNotional\": \"8.670066\",\n    \"totalPositionNotional\": \"14.246782\",\n    \"totalUnrealizedFundingPnl\": \"0.000000\",\n    \"totalUnrealizedPnl\": \"0.055460\",\n    \"totalUnrealizedTradingPnl\": \"0.055460\",\n    \"tradeMakerFeeRate\": null,\n    \"tradeTakerFeeRate\": null\n}"}],"_postman_id":"69aafedb-8274-4e21-bbaf-91dace8b8f31"},{"name":"/trade/account/trades","id":"0adbf143-189f-40e0-afdc-88af4cba3c79","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api-staging.hibachi.xyz/trade/account/trades?accountId=<accountId>","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the trade history of your account. The <code>id</code> returned from one response should be used for pagination.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li><code>accountId</code></li>\n</ul>\n<h4 id=\"optional-query-parameters\"><strong>Optional Query Parameters</strong></h4>\n<ul>\n<li><p><code>maxJournalId</code> : This is used for pagination. This is not needed to be set on the first request. All trades with <code>id</code> less than or equal to this value will be returned in descending order.</p>\n</li>\n<li><p><code>limit</code> : The number of trades to return (Default: 100)</p>\n</li>\n<li><p><code>contractId</code>: The market to filter by. (Default: returns all trades across all markets)</p>\n</li>\n<li><p><code>side</code>: Filter trades by <code>buy</code> or <code>sell</code></p>\n</li>\n<li><p><code>startTime</code> : Filter trades after <code>startTime</code> in Unix timestamp seconds</p>\n</li>\n<li><p><code>endTime</code>: Filter trades before <code>endTime</code> in Unix timestamp seconds</p>\n</li>\n</ul>\n<h4 id=\"key-response-fields\">Key Response Fields</h4>\n<p><code>trades</code>: an array of trades, with each element containing (at least) the following fields</p>\n<ul>\n<li><p><code>askAccountId</code></p>\n</li>\n<li><p><code>askOrderId</code></p>\n</li>\n<li><p><code>bidAccountId</code></p>\n</li>\n<li><p><code>bidOrderId</code></p>\n</li>\n<li><p><code>fee</code> - fee paid (in USDT) on this trade</p>\n</li>\n<li><p><code>id</code> - unique identifier for the trade</p>\n</li>\n<li><p><code>orderType</code> - LIMIT or MARKET</p>\n</li>\n<li><p><code>price</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>realizedPnl</code></p>\n</li>\n<li><p><code>side</code></p>\n</li>\n<li><p><code>symbol</code></p>\n</li>\n<li><p><code>timestamp</code> - the timestamp in unix epoch seconds when the trade occured</p>\n</li>\n<li><p><code>timestamp_ns_partial</code> - the subsecond component of the timestamp in nanoseconds</p>\n</li>\n<li><p><code>isTaker</code> - whether or not the trade took liquidity</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","account","trades"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"accountId","value":"<accountId>"}],"variable":[]}},"response":[{"id":"6fd8f7a7-8de5-4ed9-8a08-5fe18f674db5","name":"Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api.hibachi.xyz/trade/account/trades?accountId=126","protocol":"https","host":["api","hibachi","xyz"],"path":["trade","account","trades"],"query":[{"key":"accountId","value":"126"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:39:14 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=flZCijHsbsU6DXyohb4/JkfxoopC3pZ6zqaPcShsW3kCk/PmvSt+V+KlP2NU42kRM8fujac8JSmcqQ3oXsq55yuIZuPnN/I4kPUK28AlDX9JRJCJhKoAw2qI01IU; Expires=Tue, 16 Apr 2024 19:39:14 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=flZCijHsbsU6DXyohb4/JkfxoopC3pZ6zqaPcShsW3kCk/PmvSt+V+KlP2NU42kRM8fujac8JSmcqQ3oXsq55yuIZuPnN/I4kPUK28AlDX9JRJCJhKoAw2qI01IU; Expires=Tue, 16 Apr 2024 19:39:14 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871cf64759e853ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"trades\": [\n        {\n            \"askAccountId\": 126,\n            \"askOrderId\": 582869893016453100,\n            \"bidAccountId\": 131,\n            \"bidOrderId\": 582869893208343600,\n            \"fee\": \"0.141460\",\n            \"id\": 1818286,\n            \"orderType\": \"LIMIT\",\n            \"price\": \"2369.078949\",\n            \"quantity\": \"0.398074810\",\n            \"realizedPnl\": \"0.000000\",\n            \"side\": \"Sell\",\n            \"symbol\": \"ETH/USDT-P\",\n            \"timestamp\": 1728516134\n        },\n        {\n            \"askAccountId\": 126,\n            \"askOrderId\": 582869868833669100,\n            \"bidAccountId\": 131,\n            \"bidOrderId\": 582869893208343600,\n            \"fee\": \"0.111748\",\n            \"id\": 1818285,\n            \"orderType\": \"LIMIT\",\n            \"price\": \"2370.254596\",\n            \"quantity\": \"0.314306980\",\n            \"realizedPnl\": \"-0.000001\",\n            \"side\": \"Sell\",\n            \"symbol\": \"ETH/USDT-P\",\n            \"timestamp\": 1728516134\n        }\n    ]\n}"}],"_postman_id":"0adbf143-189f-40e0-afdc-88af4cba3c79"},{"name":"/trade/account/settlements_history","id":"28185336-04b7-4480-bcc8-a33516ad458b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/account/settlements_history?accountId=<accountId>","description":"<h4 id=\"usage\">Usage</h4>\n<p>You can obtain the history of funding events using the <code>/trade/account/settlements_history</code> endpoint.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li>accountId</li>\n</ul>\n<h4 id=\"optional-query-parameters\"><strong>Optional Query Parameters</strong></h4>\n<ul>\n<li><p><code>page</code> - number used for pagination</p>\n</li>\n<li><p><code>limit</code> - number of results to return for a single call</p>\n</li>\n<li><p><code>contractId</code> - the market to filter by</p>\n</li>\n<li><p><code>startTime</code> - filter events by start time</p>\n</li>\n<li><p><code>endTime</code> - filter events by end time</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","account","settlements_history"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"accountId","value":"<accountId>"}],"variable":[]}},"response":[{"id":"05ca95ac-0da1-4bc7-bdd7-36ee887305a6","name":"Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api-staging.hibachi.xyz/trade/account/settlements_history?accountId=126","host":["https://api-staging.hibachi.xyz"],"path":["trade","account","settlements_history"],"query":[{"key":"accountId","value":"126"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"settlements\": [\n        {\n            \"direction\": \"Long\",\n            \"indexPrice\": \"0.181674880\",\n            \"quantity\": \"169893.725093\",\n            \"settledAmount\": \"-21.801042451916253\",\n            \"symbol\": \"HFT/USDT-P\",\n            \"timestamp\": 1720512543\n        },\n        {\n            \"direction\": \"Short\",\n            \"indexPrice\": \"57202.23399\",\n            \"quantity\": \"0.2409505256\",\n            \"settledAmount\": \"4.271524297077262\",\n            \"symbol\": \"BTC/USDT-P\",\n            \"timestamp\": 1720512543\n        }\n    ]\n}"}],"_postman_id":"28185336-04b7-4480-bcc8-a33516ad458b"},{"name":"/trade/orders","id":"3243f8a0-086c-44c5-ab8a-71bbb7bab403","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/orders?accountId=<accountId>","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the pending orders of your account.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li>accountId</li>\n</ul>\n<h4 id=\"response-key-fields\">Response Key Fields</h4>\n<ul>\n<li><p><code>total_quantity</code> is the quantity you specify when you submit the order.</p>\n</li>\n<li><p><code>available_quantity</code> is the quanaity that is remaining for match. It is <code>total_quantity</code> minus matched quantity.</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","orders"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"accountId","value":"<accountId>"}],"variable":[]}},"response":[{"id":"18dadfc7-01f2-4874-96f8-72421cf0e128","name":"Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api-staging.hibachi.xyz/trade/orders?accountId=128","host":["https://api-staging.hibachi.xyz"],"path":["trade","orders"],"query":[{"key":"accountId","value":"128"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:39:36 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=IBBP3R6ksWT+4ohRG+A2ztC7ZmSUSR9ud0xMca2cu/llpee2HRAY04wdhH2jz7ZSnBtnftAUeR2gkAL8elSXUhnZcTyNkKQRwfm+hJnLn89IcTGiv9TTNiFumQoU; Expires=Tue, 16 Apr 2024 19:39:36 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=IBBP3R6ksWT+4ohRG+A2ztC7ZmSUSR9ud0xMca2cu/llpee2HRAY04wdhH2jz7ZSnBtnftAUeR2gkAL8elSXUhnZcTyNkKQRwfm+hJnLn89IcTGiv9TTNiFumQoU; Expires=Tue, 16 Apr 2024 19:39:36 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871cf6d228d753ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"accountId\": 126,\n        \"availableQuantity\": \"0.389560448\",\n        \"contractId\": 1,\n        \"creationTime\": 1731609679,\n        \"orderId\": \"582870002718998528\",\n        \"clientId\": \"my-order-1\",\n        \"orderType\": \"LIMIT\",\n        \"price\": \"2344.032723\",\n        \"side\": \"BID\",\n        \"status\": \"PLACED\",\n        \"symbol\": \"ETH/USDT-P\",\n        \"totalQuantity\": \"0.389560448\"\n    },\n    {\n        \"accountId\": 126,\n        \"availableQuantity\": \"0.161019613\",\n        \"contractId\": 1,\n        \"creationTime\": 1731609680,\n        \"orderId\": \"582869893300355075\",\n        \"clientId\": null,\n        \"orderType\": \"LIMIT\",\n        \"price\": \"2384.689923\",\n        \"side\": \"ASK\",\n        \"status\": \"PLACED\",\n        \"symbol\": \"ETH/USDT-P\",\n        \"totalQuantity\": \"0.161019613\"\n    }\n]"}],"_postman_id":"3243f8a0-086c-44c5-ab8a-71bbb7bab403"},{"name":"/trade/order","id":"096a8854-b918-4de8-8731-b2a28d26b96d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/order?orderId=580604712937324546&accountId=<accountId>","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the details about <strong>one particular order</strong>.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li><p>accountId</p>\n</li>\n<li><p>Order identifier - exactly one of:</p>\n<ul>\n<li><p><code>orderId</code>: should be the <code>orderId</code> returned by <code>/trade/order</code> or <code>/trade/orders</code></p>\n</li>\n<li><p><code>clientId</code>: please see the documentation in <code>POST /trade/order</code> for more details</p>\n</li>\n<li><p><code>nonce</code> used when submitting the order</p>\n</li>\n</ul>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","order"],"host":["https://api-staging.hibachi.xyz"],"query":[{"key":"orderId","value":"580604712937324546"},{"key":"accountId","value":"<accountId>"}],"variable":[]}},"response":[{"id":"8ce8fbfe-b751-471a-9909-7318964f7151","name":"Example","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"url":{"raw":"https://api-staging.hibachi.xyz/trade/order?orderId=578721663729838093&accountId=128","host":["https://api-staging.hibachi.xyz"],"path":["trade","order"],"query":[{"key":"orderId","value":"578721663729838093"},{"key":"accountId","value":"128"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json","enabled":true},{"key":"content-length","value":"210","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"date","value":"Tue, 09 Apr 2024 19:45:02 GMT","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"accountId\": 126,\n    \"availableQuantity\": \"0.389560448\",\n    \"contractId\": 1,\n    \"orderId\": \"582870002718998528\",\n    \"clientId\": \"my-order-1\",\n    \"orderType\": \"LIMIT\",\n    \"price\": \"2344.032723\",\n    \"side\": \"BID\",\n    \"status\": \"PLACED\",\n    \"symbol\": \"ETH/USDT-P\",\n    \"totalQuantity\": \"0.389560448\"\n}"}],"_postman_id":"096a8854-b918-4de8-8731-b2a28d26b96d"},{"name":"/trade/order","id":"00f6d5ad-5275-41cb-a1a8-19ed5d142124","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": \"<accountId>\",\n    \"symbol\":\"BTC/USDT-P\",\n    \"nonce\": 1722449703124,\n    \"side\":\"ASK\",\n    \"orderType\":\"LIMIT\",\n    \"quantity\":\"0.0001\",\n    \"price\":\"100000\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n    \"maxFeesPercent\": \"0.00045\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/order","description":"<h4 id=\"usage\">Usage</h4>\n<p>Submit a new order.</p>\n<p>In the response, it will return the <code>order_id</code> for this new order.</p>\n<h4 id=\"signing\">Signing</h4>\n<p>Use below field to sign the message and pass it in to <code>signature</code> field (65 bytes) Refer to the <a href=\"https://documenter.getpostman.com/view/28403799/2sA3BgAFYV#signing\">Signing section</a> for more context</p>\n<ul>\n<li><p><code>nonce</code></p>\n</li>\n<li><p><code>contractId</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>side</code></p>\n</li>\n<li><p><code>price</code></p>\n</li>\n<li><p><code>maxFeesPercent, should be at least the returned value of /market/exchange-info endpoint. Otherwise, it will be rejected.</code></p>\n</li>\n<li><p><code>creationDeadline (Optional)</code></p>\n</li>\n<li><p><code>triggerPrice (Optional)</code></p>\n</li>\n</ul>\n<h4 id=\"required-request-body-fields\">Required Request Body Fields:</h4>\n<ul>\n<li><p><code>accountId</code> : your account ID, you can get this on \"API Keys\" panel</p>\n</li>\n<li><p><code>symbol:</code>should be one of the symbol from one of the <code>futureContracts</code> returned by <code>/market/exchange-info</code> API</p>\n</li>\n<li><p><code>nonce:</code> should be a unix timestamp in miliseconds or microseconds, and it must be unique to this order</p>\n</li>\n<li><p><code>side:</code> should be one of: <code>ASK</code>, <code>BID</code></p>\n</li>\n<li><p><code>orderType</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>price</code></p>\n</li>\n<li><p><code>signature</code></p>\n</li>\n<li><p><code>maxFeesPercent</code></p>\n</li>\n</ul>\n<h4 id=\"optional-request-body-fields\">Optional Request Body Fields</h4>\n<ul>\n<li><p><code>creationDeadline</code></p>\n</li>\n<li><p><code>triggerPrice</code></p>\n</li>\n<li><p><code>twapConfig</code></p>\n</li>\n<li><p><code>orderFlags</code></p>\n</li>\n<li><p><code>clientId</code></p>\n</li>\n</ul>\n<h4 id=\"about-order-client-id\"><strong>About order client ID</strong></h4>\n<p>A user may provide a <code>clientId</code> when creating an order. This ID can then be used to <strong>query</strong>, <strong>modify</strong>, or <strong>cancel</strong> that order.</p>\n<p>A valid <code>clientId</code> must meet the following requirements:</p>\n<ol>\n<li><p>Length is between <strong>1</strong> and <strong>32</strong> characters (inclusive).</p>\n</li>\n<li><p>Contains only:</p>\n<ul>\n<li><p>ASCII letters (<code>A–Z</code>, <code>a–z</code>)</p>\n</li>\n<li><p>ASCII digits (<code>0–9</code>)</p>\n</li>\n<li><p>The dash character (<code>-</code>)</p>\n</li>\n</ul>\n</li>\n<li><p>Must be <strong>unique</strong> among your orders.</p>\n</li>\n</ol>\n<p><strong>Notes:</strong></p>\n<ul>\n<li><p>The <code>clientId</code> is case-sensitive.</p>\n</li>\n<li><p>Uniqueness is checked against active and recently inactive orders. While it may be technically possible to reuse a <code>clientId</code> from an older order, reuse is strongly discouraged.</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","order"],"host":["https://api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"f43e9fc4-694b-44a6-a44f-1450577c0287","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"body":{"mode":"raw","raw":"{\n    \"accountId\": 128,\n    \"symbol\": \"ETH/USDT-P\",\n    \"nonce\": 1714701600000000,\n    \"orderType\": \"LIMIT\",\n    \"side\": \"BID\",\n    \"quantity\": \"1.2\",\n    \"price\": \"3500.1\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n    \"maxFeesPercent\": \"0.00045\",\n    \"clientId\": \"my-order-1\" // Optional\n}","options":{"raw":{"language":"json"}}},"url":"https://api.hibachi.xyz/trade/order"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json","enabled":true},{"key":"content-length","value":"31","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"date","value":"Tue, 09 Apr 2024 19:45:31 GMT","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"orderId\": \"578721673790138368\"\n}"}],"_postman_id":"00f6d5ad-5275-41cb-a1a8-19ed5d142124"},{"name":"/trade/orders","id":"c2840b9b-f02c-44ed-937d-dc2819f135b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": \"<accountId>\",\n    \"orders\": [\n        {\n            \"action\": \"place\",\n            \"nonce\": 1714701600000000,\n            \"symbol\": \"ETH/USDT-P\",\n            \"orderType\": \"LIMIT\",\n            \"side\": \"BID\",\n            \"quantity\": \"1.01\",\n            \"price\": \"3500.1\",\n            \"maxFeesPercent\": \"0.00045\",\n            \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n        },\n        {\n            \"action\": \"modify\",\n            \"orderId\": \"578721673790138369\",\n            \"nonce\": 1714701600000002,\n            \"updatedQuantity\": \"0.1\",\n            \"updatedPrice\": \"3500.1\",\n            \"maxFeesPercent\": \"0.00045\",\n            \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n        }, \n        {\n            \"action\": \"cancel\",\n            \"orderId\": \"578721673790138370\",\n            \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/orders","description":"<h4 id=\"usage\">Usage</h4>\n<p>Submit multiple new order requests for an account. Supports <code>place</code>, and <code>modify</code> .</p>\n<p>The format is identical to POST <code>/trade/order</code>, the only differences are:</p>\n<ul>\n<li><p><code>accountId</code> is specified in the top-level only once rather than for each order</p>\n</li>\n<li><p>each <code>order</code> element needs to have an <code>action</code> field which can be either <code>place</code>, or <code>modify</code></p>\n</li>\n</ul>\n<p>It will return a list of responses – one for each <code>order</code> in the input.</p>\n<h4 id=\"signing\">Signing</h4>\n<p>Use below field to sign the message and pass it in to <code>signature</code> field (65 bytes). Refer to the <a href=\"https://documenter.getpostman.com/view/28403799/2sA3BgAFYV#signing\">Signing section</a> for more context.</p>\n<ul>\n<li><p><code>nonce</code></p>\n</li>\n<li><p><code>contractId</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>side</code></p>\n</li>\n<li><p><code>price</code></p>\n</li>\n<li><p><code>maxFeesPercent, should be at least the value returned from /market/exchange-info endpoint, otherwise, it will be rejected.</code></p>\n</li>\n<li><p><code>creationDeadline (Optional)</code></p>\n</li>\n<li><p><code>triggerPrice (Optional)</code></p>\n</li>\n</ul>\n<h4 id=\"request-body-required-fields\">Request Body Required Fields:</h4>\n<ul>\n<li><p><code>accountId</code> :should be one of: <code>LIMIT, MARKET</code></p>\n</li>\n<li><p><code>symbol:</code>should be one of the symbol from one of the <code>futureContracts</code> returned by <code>/market/exchange-info</code> API</p>\n</li>\n<li><p><code>nonce:</code> should be a unix timestamp either ms or us unique to this order</p>\n</li>\n<li><p><code>side:</code> should be one of: <code>ASK</code>, <code>BID</code></p>\n</li>\n<li><p><code>orderType</code></p>\n</li>\n<li><p><code>quantity</code></p>\n</li>\n<li><p><code>price</code></p>\n</li>\n<li><p><code>signature</code></p>\n</li>\n<li><p><code>action</code>: should be <code>place</code>,or <code>modify</code></p>\n</li>\n<li><p>maxFeesPercent</p>\n</li>\n</ul>\n<h4 id=\"optional-request-body-fields\">Optional Request Body Fields:</h4>\n<ul>\n<li><p><code>creationDeadline</code></p>\n</li>\n<li><p><code>triggerPrice</code></p>\n</li>\n<li><p><code>orderFlags</code></p>\n</li>\n<li><p><code>clientId</code> (See the documentation in <code>POST /trade/order</code> for more details)</p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","orders"],"host":["https://api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"95586772-ce7e-4839-95e2-9c0e7f75ccc2","name":"Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"body":{"mode":"raw","raw":"{\n    \"accountId\": \"<accountId>\",\n    \"orders\": [\n        {\n            \"action\": \"place\",\n            \"nonce\": 1714701600000000,\n            \"symbol\": \"ETH/USDT-P\",\n            \"orderType\": \"LIMIT\",\n            \"side\": \"BID\",\n            \"quantity\": \"1.01\",\n            \"price\": \"3500.1\",\n            \"maxFeesPercent\": \"0.00045\",\n            \"clientId\": \"my-order-1\", // Optional\n            \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n        },\n        {\n            \"action\": \"modify\",\n            \"orderId\": \"578721673790138369\",\n            \"nonce\": 1714701600000002,\n            \"updatedQuantity\": \"0.1\",\n            \"updatedPrice\": \"3500.1\",\n            \"maxFeesPercent\": \"0.00045\",\n            \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n        }, \n        {\n            \"action\": \"cancel\",\n            \"orderId\": \"578721673790138370\",\n            \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/orders"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json","enabled":true},{"key":"content-length","value":"112","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"date","value":"Tue, 09 Apr 2024 19:45:56 GMT","enabled":true}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"orderId\": \"578721673790138368\"\n    }\n]"}],"_postman_id":"c2840b9b-f02c-44ed-937d-dc2819f135b4"},{"name":"/trade/order","id":"94d2cdaf-1c71-440f-a981-da1112824810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"orderId\": \"578721673790138369\",\n    \"accountId\": \"<accountId>\",\n    \"nonce\": 1714701600000002,\n    \"updatedQuantity\": \"0.1\",\n    \"updatedPrice\": \"3500.1\",\n    \"maxFeesPercent\": \"0.00045\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/order","description":"<h4 id=\"usage\">Usage</h4>\n<p>Modify an existing order.</p>\n<h4 id=\"signing\">Signing</h4>\n<p>Refer to the <a href=\"https://documenter.getpostman.com/view/28403799/2sA3BgAFYV#signing\">Signing section</a> for more context</p>\n<h4 id=\"request-body-required-fields\">Request Body Required Fields:</h4>\n<ul>\n<li><p>Order identifier - exactly one of:</p>\n<ul>\n<li><p><code>orderId</code>: should be the <code>orderId</code> returned by <code>/trade/order</code> or <code>/trade/orders</code></p>\n</li>\n<li><p><code>clientId</code>: please see the documentation in <code>POST /trade/order</code> for more details</p>\n</li>\n<li><p><code>nonce</code> : nonce used to create the order initially</p>\n</li>\n</ul>\n</li>\n<li><p><code>nonce</code> : A new unique nonce timestamp (same as if you were placing a new order).</p>\n</li>\n<li><p>You can only update <code>quantity</code> and <code>price</code>. The symbol must remain the same.</p>\n</li>\n<li><p><code>signature</code></p>\n</li>\n<li><p>maxFeesPercent: should be at least the value returned by the /market/exchange-info endpoint, otherwise, it will be rejected.</p>\n</li>\n</ul>\n<p>For <code>clientId</code> , please see the documentation in <code>POST /trade/order</code> for more details.</p>\n<h4 id=\"notes\">Notes</h4>\n<ul>\n<li>You <strong>cannot</strong> modify an order that has been partially matched.</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","order"],"host":["https://api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"b3641ed6-d9b9-40c8-a826-846625050307","name":"Example","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"body":{"mode":"raw","raw":"{\n    \"orderId\": \"578721673790138369\", // You can also use \"clientId\" instead\n    \"accountId\": 128,\n    \"nonce\": 1714701600000002,\n    \"updatedQuantity\": \"0.1\",\n    \"updatedPrice\": \"3500.1\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/order"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json","enabled":true},{"key":"content-length","value":"2","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"date","value":"Tue, 09 Apr 2024 19:46:35 GMT","enabled":true}],"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"94d2cdaf-1c71-440f-a981-da1112824810"},{"name":"/trade/order","id":"e99c4f48-e610-4b7c-b7f6-1b4bb7af0271","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": \"<accountId>\",\n    \"orderId\": \"578721673790138368\",\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/order","description":"<h4 id=\"usage\">Usage</h4>\n<p>Remove an existing order.</p>\n<h4 id=\"signing\">Signing</h4>\n<p>Use below field to sign the message and pass it in to <code>signature</code> field (65 bytes). Refer to the <a href=\"https://documenter.getpostman.com/view/28403799/2sA3BgAFYV#signing\">Signing section</a> for more context</p>\n<ul>\n<li><p>Order identifier - exactly one of:</p>\n<ul>\n<li><p><code>orderId</code>: should be the <code>orderId</code> returned by <code>/trade/order</code> or <code>/trade/orders</code></p>\n</li>\n<li><p><code>clientId</code>: please see the documentation in <code>POST /trade/order</code></p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"request-body-required-fields\">Request Body Required Fields:</h4>\n<ul>\n<li><p><code>accountId</code></p>\n</li>\n<li><p>Order identifier - exactly one of:</p>\n<ul>\n<li><p><code>orderId</code>: should be the <code>orderId</code> returned by <code>/trade/order</code> or <code>/trade/orders</code></p>\n</li>\n<li><p><code>clientId</code>: please see the documentation in <code>POST /trade/order</code> for more details</p>\n</li>\n</ul>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","order"],"host":["https://api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"5421e64e-6452-4181-aa9f-e6eda506d8cb","name":"Example","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"body":{"mode":"raw","raw":"{\n    \"accountId\": 128,\n    \"orderId\": \"578721673790138368\", // You can also use \"clientId\" instead\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/order"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json","enabled":true},{"key":"content-length","value":"2","enabled":true},{"key":"access-control-allow-credentials","value":"true","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"date","value":"Tue, 09 Apr 2024 19:47:05 GMT","enabled":true}],"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"e99c4f48-e610-4b7c-b7f6-1b4bb7af0271"},{"name":"/trade/orders","id":"8ed24695-016e-49b2-a72d-7511ca921fee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": \"<accountId>\",\n    \"nonce\": 1714701600000000,\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/orders","description":"<h4 id=\"usage\">Usage</h4>\n<p>Allows you to batch cancel all open orders for an account.</p>\n<h4 id=\"signing\">Signing:</h4>\n<p>Refer to the <a href=\"https://documenter.getpostman.com/view/28403799/2sA3BgAFYV#signing\">Signing section</a> for more context</p>\n<ul>\n<li><code>nonce</code> needs to be a unique valid timestamp nonce and needs to be used as the payload for signature</li>\n</ul>\n<h4 id=\"request-body-required-fields\">Request Body Required Fields</h4>\n<ul>\n<li><p><code>accountId</code></p>\n</li>\n<li><p><code>nonce</code></p>\n</li>\n<li><p><code>signature</code></p>\n</li>\n</ul>\n<h4 id=\"optional-request-body-fields\">Optional Request Body Fields:</h4>\n<ul>\n<li><code>contractId</code></li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}},"urlObject":{"path":["trade","orders"],"host":["https://api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"a44108e1-166d-4a07-b7d3-228483439b89","name":"Example","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"<API-KEY>","description":"API KEY Generated from UI"}],"body":{"mode":"raw","raw":"{\n    \"accountId\": 128,\n    \"nonce\": 1714701600000000,\n    \"signature\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api-staging.hibachi.xyz/trade/orders"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\"\n}"}],"_postman_id":"8ed24695-016e-49b2-a72d-7511ca921fee"},{"name":"/trade/account/leverage","id":"a28d8b6d-cc12-4b39-a540-57ebc707585b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": 156,\n    \"symbol\": \"BTC/USDT-P\",\n    \"initialMarginRate\": \"0.6\"\n}\n","options":{"raw":{"language":"json"}}},"url":"https://api-test.hibachi.xyz/trade/account/leverage","description":"<h4 id=\"usage\">Usage</h4>\n<p>Set the custom leverage for one contract</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li><p>accountId</p>\n</li>\n<li><p>symbol</p>\n</li>\n<li><p>initialMarginRate: the inverse of leverage. (\"0.5\" means 2x leverage)</p>\n</li>\n</ul>\n<h4 id=\"notes\">Notes</h4>\n<p>The <code>initialMarginRate</code> must be between the default value and 1.</p>\n<p>When you increase <code>initialMarginRate</code>, after that your initial margin should still be no more than your net equity.</p>\n","urlObject":{"protocol":"https","path":["trade","account","leverage"],"host":["api-test","hibachi","xyz"],"query":[],"variable":[]}},"response":[{"id":"c779af69-1f01-4ebc-9975-6423385c8673","name":"/trade/account/leverage","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"accountId\": 156,\n    \"symbol\": \"BTC/USDT-P\",\n    \"initialMarginRate\": \"0.6\"\n}\n","options":{"raw":{"language":"json"}}},"url":"https://api-test.hibachi.xyz/trade/account/leverage"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Fri, 29 Aug 2025 18:06:10 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"976dfb109ac9c985-IAD"},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers"},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers"},{"key":"vary","value":"accept-encoding"},{"key":"access-control-allow-credentials","value":"true"},{"key":"Content-Encoding","value":"gzip"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains; preload"},{"key":"expect-ct","value":"max-age=86400, enforce"},{"key":"referrer-policy","value":"same-origin"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"x-xss-protection","value":"1; mode=block"},{"key":"Server","value":"cloudflare"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\"\n}"}],"_postman_id":"a28d8b6d-cc12-4b39-a540-57ebc707585b"}],"id":"d34f9797-9ca0-43d2-9c7f-0e45530a11e4","description":"<h2 id=\"signatures\">Signatures</h2>\n<p>All write operations (place orders, edit orders, cancel orders, withdraw requests) require signatures.</p>\n<ul>\n<li><p><strong>For self-managed accounts</strong>, these signatures use ECDSA with private keys derived from the user's seed phrase.</p>\n</li>\n<li><p><strong>For exchange-managed accounts</strong>, these signatures use HMAC with the secret created for a specific API key.</p>\n</li>\n</ul>\n<p>Each operation has a specific method for generating the signature digest that needs to be signed. Each operation is detailed below. All numbers are formatted in big endian.</p>\n<hr />\n<h2 id=\"place--edit-order\">Place / Edit Order</h2>\n<h4 id=\"structure\">Structure</h4>\n<p>The payload for placing or editing orders consists of the following. For editing and querying an order, you can use either the <code>orderId</code> ,<code>nonce</code> , or <code>clientId</code> field to refer to the order.</p>\n<ul>\n<li><p><em>Nonce</em>: 8 bytes</p>\n<ul>\n<li><p>Current timestamp serving as a unique identifier for your order</p>\n</li>\n<li><p>Nonce needs to be a milli-second or micro-second unix timestamp within +- 15 seconds of the current time</p>\n</li>\n<li><p>Nonce needs to be unique per account (if you send two orders with the same nonce from the same account, they will be rejected by our API)</p>\n</li>\n</ul>\n</li>\n<li><p><em>Contract ID</em>: 4 bytes</p>\n</li>\n<li><p><em>Quantity</em>: 8 bytes</p>\n<ul>\n<li>See <a href=\"#8697dc40-98bb-4d3a-8a6e-9d823a865293\">section on asset quantities</a> for how these are computed</li>\n</ul>\n</li>\n<li><p><em>Side</em>: 4 bytes</p>\n<ul>\n<li><p>Ask: 0</p>\n</li>\n<li><p>Bid: 1</p>\n</li>\n</ul>\n</li>\n<li><p><em>Price</em> <em>(<strong><strong>Optional</strong></strong>)</em>: 8 bytes</p>\n<ul>\n<li><p>Only applicable for limit orders</p>\n</li>\n<li><p>See <a href=\"#8697dc40-98bb-4d3a-8a6e-9d823a865293\">section on asset prices</a> for how these are computed</p>\n</li>\n</ul>\n</li>\n<li><p><em>Price Limit (__<strong>Optional):</strong></em> <em>8 bytes</em></p>\n<ul>\n<li><p>Only applicable for market orders</p>\n</li>\n<li><p>Trades below/above it (depending on side of the order) would not be executed. If it is not provided for a order, a default priceLimit would be applied in exchange.)</p>\n</li>\n</ul>\n</li>\n<li><p><em>Max Fees</em>: 8 bytes</p>\n<ul>\n<li><p>Maximum fees allowed for order operation</p>\n</li>\n<li><p>Denoted in basis points (e.g. <code>20 =&gt; 0.2% fee</code>)</p>\n</li>\n<li><p>For the current test phase, fees can be set to <code>0</code>. Once we finalize fee models, this will change</p>\n</li>\n</ul>\n</li>\n<li><p><em>Creation Deadline</em> <strong>(Optional):</strong></p>\n<ul>\n<li><p>If our system can not place the order by the deadline, the order will be rejected.</p>\n</li>\n<li><p>This is useful if you are concerned about high network or system latency.</p>\n</li>\n<li><p>The <code>creationDeadline</code> field should have the number of seconds since the Unix epoch as a floating point number.</p>\n</li>\n<li><p>For trigger orders, the creation deadline is applied to the order when it is triggered.</p>\n</li>\n</ul>\n</li>\n<li><p><em>Trigger Price</em> <strong>(Optional)</strong>:</p>\n<ul>\n<li><p>If present, indicates that this is a trigger order (also called stop order) that should be sent when the market price reaches the trigger price.</p>\n</li>\n<li><p>When modifying trigger orders:</p>\n<ul>\n<li><p>If order has been triggered, you should not set the <code>updatedTriggerPrice</code> field. You can modify the order like a regular limit order.</p>\n</li>\n<li><p>If the order has not been triggered yet, you should set the <code>updatedTriggerPrice</code> field with the new trigger price.</p>\n</li>\n<li><p>If the order has not been triggered yet, you can modify market orders to limit orders and vice-versa.</p>\n<ul>\n<li><p>If updatedPrice is present, the order will be modified to a limit order with that price.</p>\n</li>\n<li><p>If updatedPrice is absent, the order will be modified to a market order.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p>When triggered, the order ends up at the back of the queue for the price level.</p>\n</li>\n</ul>\n</li>\n<li><p><em>Trigger Direction</em> <strong>(Optional):</strong></p>\n<ul>\n<li><p>This field is <strong>only</strong> handled for trigger orders.</p>\n</li>\n<li><p>either \"HIGH\" or \"LOW\"</p>\n</li>\n<li><p>If present, indicates which direction of price move a trigger order should be triggered. If the price is already above or below the specified triggerPrice / triggerDirection combo at the time of order entry or modification, the trigger order will be automatically triggered.</p>\n</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">// Triggered when price is below 99,900.\n{\n  \"symbol\": \"BTC/USDT-P\",\n  \"side\": \"ASK\",\n  \"nonce\": 1714701600000000,\n  \"quantity\": \"1 BTC\", \n  \"price\": \"100,000 USDT\",\n  \"maxFees\": 0,\n  \"triggerPrice\": \"99,900 USDT\",\n  \"triggerDirection\": \"LOW\",\n}\n// Triggered when price is above 99,900.\n{\n  \"symbol\": \"BTC/USDT-P\",\n  \"side\": \"BID\",\n  \"nonce\": 1714701600000000,\n  \"quantity\": \"1 BTC\", \n  \"price\": \"100,000 USDT\",\n  \"maxFees\": 0,\n  \"triggerPrice\": \"99,900 USDT\",\n  \"triggerDirection\": \"HIGH\",\n}\n// triggerDirection unspecified - determined automatically by the current mark price.\n// If current mark price &lt; 99,900 USDT triggerDirection is HIGH and vice versa\n{\n  \"symbol\": \"BTC/USDT-P\",\n  \"side\": \"BID\",\n  \"nonce\": 1714701600000000,\n  \"quantity\": \"1 BTC\", \n  \"price\": \"100,000 USDT\",\n  \"maxFees\": 0,\n  \"triggerPrice\": \"99,900 USDT\",\n}\n\n</code></pre>\n<ul>\n<li><p><em>Parent Order</em> <strong>(Optional):</strong></p>\n<ul>\n<li><p>This field is <strong>only</strong> handled for trigger orders.</p>\n</li>\n<li><p>If present, indicates that this is a <em>child</em> trigger order that should be activated only <strong>after</strong> the parent order is <strong>at least partially filled</strong>.</p>\n</li>\n<li><p>When the parent order receives a fill <strong>(even a partial fill)</strong>, the child trigger order activates, converting into a normal trigger order.</p>\n</li>\n<li><p>If the parent order is cancelled prior to being filled, all child trigger orders with that parent are also cancelled.</p>\n</li>\n<li><p>Order creation / modification will fail if the parent order does not at the time of the request. For this reason, it is recommended that the batch order entry api be used.</p>\n</li>\n<li><p>A <code>nonce</code>, <code>orderId</code> , or <code>clientId</code> can be used for the parent order</p>\n</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"symbol\": \"BTC/USDT-P\",\n  \"side\": \"ASK\",\n  \"nonce\": 1714701600000000,\n  \"quantity\": \"1 BTC\", \n  \"price\": \"100,000 USDT\",\n  \"maxFees\": 0,\n  \"triggerPrice\": \"99,900 USDT\",\n  \"parentOrder\": { \"nonce\": 113801600002000 }\n  // OR \"parentOrder\": { \"orderId\": 12344212441 }\n}\n\n</code></pre>\n<ul>\n<li><p><em>TWAP Duration</em> <strong>(Optional)</strong></p>\n<ul>\n<li><p>If present, <code>twapDurationMinutes</code> is the duration of the TWAP (trade-weighted average price) order in minutes.</p>\n</li>\n<li><p>This must be an integer between 1 and 60, inclusive.</p>\n</li>\n<li><p>A child order is sent every 30 seconds during the duration.</p>\n</li>\n</ul>\n</li>\n<li><p>TWAP Quantity Mode <strong>(Optional)</strong></p>\n<ul>\n<li><p>If present, <code>twapQuantityMode</code> configures the quantities of the child orders:</p>\n<ul>\n<li><p>If set to \"RANDOM\", the quantity is randomized.</p>\n</li>\n<li><p>If set to \"FIXED\", the total quantity of the TWAP order is evenly divided across child orders.</p>\n</li>\n</ul>\n</li>\n<li><p>If a child order is not fully filled, the unfilled quantity is rolled over into subsequent child orders.</p>\n</li>\n</ul>\n</li>\n<li><p>Order Flags <strong>(Optional)</strong></p>\n<ul>\n<li><p>Order flags are only supported for limit orders.</p>\n</li>\n<li><p>If <code>orderFlags</code> has the value <code>POST_ONLY</code>, then this order is a post-only order, and will only add liquidity to the order book.</p>\n<ul>\n<li><p>The max fee for post-only orders must be at least the maker fee.</p>\n</li>\n<li><p>If the order would match with the order book, the order will be rejected with <code>rejectionReason</code> \"PostOnlyOrderDoesNotAddLiquidity\". In the REST API, this can be seen by querying the order's status. In the WebSocket API, you will receive the \"order_request_rejected\" message.</p>\n</li>\n</ul>\n</li>\n<li><p>If <code>orderFlags</code> is \"IOC\", then this order is an immediate-or-cancel order, and will only take liquidity from the order book.</p>\n</li>\n<li><p>If <code>orderFlags</code> is \"REDUCE_ONLY\", then this order is (for the time being) an IOC order that will only reduce your position.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"twap-orders\">TWAP orders</h4>\n<p>Querying TWAP orders yields the \"SCHEDULED_TWAP\" order status, which has the following additional fields:</p>\n<ul>\n<li><p><code>numOrdersRemaining</code> is the number of child orders that will be sent in the future.</p>\n</li>\n<li><p><code>numOrdersTotal</code> is the total number of child orders (including past and future orders).</p>\n</li>\n<li><p><code>quantityMode</code> is the TWAP quantity mode.</p>\n</li>\n</ul>\n<p>You can cancel TWAP orders, but you can not edit them. For TWAP orders, child orders will execute within 5% of the price at the time when the original TWAP order was sent.</p>\n<h4 id=\"tpsl-orders\">TP/SL orders</h4>\n<p>A take profit (TP) or stop loss (SL) order is defined as a reduce only stop-market (trigger) order. The following fields are relevant for TP/SL orders</p>\n<ul>\n<li><p><strong>(required)</strong> <code>triggerPrice</code> TP/SL orders are trigger orders</p>\n</li>\n<li><p><strong>(required)</strong> <code>\"orderFlags\": \"REDUCE_ONLY\"</code> TP/SL orders are reduce only</p>\n</li>\n<li><p><strong>(suggested)</strong> <code>parentOrder</code> TP/SL orders can be entered alongside parent orders to trigger only after a fill. See <code>parentOrder</code> documentation for more details</p>\n</li>\n<li><p><strong>(suggested)</strong> <code>triggerDirection</code> It is safest to specify direction, especially when mark price is very close to the current trigger price. See <code>triggerDirection</code> documentation for more details.</p>\n</li>\n</ul>\n<p>When a position is completely closed, all TP/SL orders in that position are automatically cancelled.</p>\n<h4 id=\"example\">Example</h4>\n<p>Let's assume we want to place the following order</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"symbol\": \"BTC/USDT-P\",\n  \"side\": \"ASK\",\n  \"nonce\": 1714701600000000,\n  \"quantity\": \"1 BTC\", \n  \"price\": \"100,000 USDT\",\n  \"maxFees\": 0,\n}\n\n</code></pre>\n<p>and that <code>/exchange-info</code> has returned this contract information</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"symbol\": \"BTC/USDT-P\",\n  \"id\": 2,\n  \"underlyingDecimals\": 10,\n  \"underlyingSymbol\": \"BTC\",\n  \"settlementDecimals\": 6,\n  \"settlementSymbol\": \"USDT\",\n}\n\n</code></pre>\n<p>Given the above, we can compute quantity and price:</p>\n<ul>\n<li><p><strong>Quantity</strong>: <code>1 BTC x 10^10 = 10,000,000,000</code> since <code>underlyingDecimals: 10</code></p>\n</li>\n<li><p><strong>Price</strong>: <code>100,000 USDT x 2^32 x 10^(6 - 10 = -4) = 42,949,672,960</code> since <code>priceMultiplier: 2^32</code> and <code>settlementDecimals - underlyingDecimals = 6 - 10 = -4</code></p>\n</li>\n</ul>\n<p>Using these numbers, we can compute the elements of the buffer as:</p>\n<ul>\n<li><p>Nonce <code>1714701600000000 =&gt; 0x0006178313c38800</code></p>\n</li>\n<li><p>ContractId: <code>2 =&gt; 0x00000002</code></p>\n</li>\n<li><p>Quantity: <code>10000000000 =&gt; 0x00000002540be400</code></p>\n</li>\n<li><p>Side: <code>ASK =&gt; 0x00000000</code></p>\n</li>\n<li><p>Price: <code>42949672960 =&gt; 0x0000000a00000000</code></p>\n</li>\n<li><p>Fees: <code>0 bps =&gt; 0x0000000000000000</code></p>\n</li>\n</ul>\n<p>Concatenating these elements gives us a buffer of: <code>0x0006178313c388000000000200000002540be400000000000000000a000000000000000000000000</code></p>\n<p>If exchange managed, we would sign this order using HMAC</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const hmacSignature = crypto\n        .createHmac('sha256', 'YOUR-SECRET-KEY')\n        .update(buffer)\n        .digest('hex');\n\n</code></pre>\n<p>If self-managed, we would sign using ECDSA</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const msgHash = ethers.sha256(buffer).slice(2);\nconst ecdsaSignature = ec.sign(msgHash, 'hex', { canonical: true });\n\n</code></pre>\n<p>This results in the final order payload:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"accountId\": \"&lt;AccountId&gt;\",\n  \"symbol\":\"BTC/USDT-P\",\n  \"side\":\"ASK\",\n  \"orderType\":\"LIMIT\",\n  \"quantity\":\"1\",\n  \"price\":\"100000\"\n  \"signature\": \"&lt;HMAC/ECDSA signature of 0x00061..200000002540be40..0000&gt;\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"cancel-order\">Cancel Order</h2>\n<p>For order cancellations, you simply need to sign the 64-bit <code>orderId</code> or <code>nonce</code> for the original order. You can use the <code>nonce</code>, <code>clientId</code>, or <code>orderId</code> to refer to the order.</p>\n<p>For example, the place order operation above could result in a response payload like</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"order_id\":\"579183763093760000\"\n}\n\n</code></pre>\n<p>If we wanted to cancel this order, we'd need to sign <code>579183763093760000</code> as 8 bytes, which would map to <code>0x0809ac905ae0a800</code></p>\n<h4 id=\"cancelling-all-orders\">Cancelling all orders</h4>\n<p>You can also cancel all orders by sending an HTTP delete to the /trade/orders endpoint with the account ID, a nonce, and signature signed on the nonce.</p>\n","_postman_id":"d34f9797-9ca0-43d2-9c7f-0e45530a11e4","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":true,"source":{"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","name":"Account API","type":"folder"}}}],"id":"fd6291b1-bd66-43a7-a3d5-833e4661954b","description":"<p>You can use Account API to:</p>\n<ul>\n<li><p>Query and move information related to funds: <code>/capital</code></p>\n</li>\n<li><p>Trade and view orders: <code>/trade</code></p>\n</li>\n</ul>\n","auth":{"type":"apikey","apikey":{"value":"{{vault:authorization-secret}}","key":"<key>"},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"510ba33f-10c3-4a21-b517-882705ed29bc","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"dd66eaee-62a5-4440-8186-c49f63e6ae6d","type":"text/javascript","packages":{},"exec":[""]}}],"_postman_id":"fd6291b1-bd66-43a7-a3d5-833e4661954b"},{"name":"Market API","item":[{"name":"Exchange Listings","item":[{"name":"/market/exchange-info","id":"183981da-8df5-40a0-a155-da15015dd536","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/exchange-info","description":"<h4 id=\"usage\">Usage</h4>\n<p>Return exchange metadata, currently it will return all <code>futureContracts</code>.</p>\n<p>Also returns a list of exchange maintenance windows in the \"maintenanceWindow\" field. For each window, the fields \"begin\" and \"end\" denote the beginning and end of the window, in seconds since the UNIX epoch. The field \"note\" contains a note.</p>\n<p>The field \"maintenanceStatus\" can have the values \"NORMAL\", \"UNSCHEDULED_MAINTENANCE\", \"SCHEDULED_MAINTENANCE\". If the exchange is currently under scheduled maintenance, the field \"currentMaintenanceWindow\" displays information on the current maintenance window.</p>\n","urlObject":{"path":["market","exchange-info"],"host":["https://data-api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"c7d1da06-6a96-4151-8128-77f804cc43f5","name":"Example","originalRequest":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/exchange-info"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:47:31 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=37ZawZfqGxaM1oCjv/afHBoKPVCeW+ILUOQ+dZdaVNgudOq4Z5JpzdehuA1TwVHHNDCB7CPf+gvA9zzNAB+akTWTGunMuJ5q0A7+bQ5jipaa/vJ/ykrwu/MMlMx7; Expires=Tue, 16 Apr 2024 19:47:31 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=37ZawZfqGxaM1oCjv/afHBoKPVCeW+ILUOQ+dZdaVNgudOq4Z5JpzdehuA1TwVHHNDCB7CPf+gvA9zzNAB+akTWTGunMuJ5q0A7+bQ5jipaa/vJ/ykrwu/MMlMx7; Expires=Tue, 16 Apr 2024 19:47:31 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d026c6fb753ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"feeConfig\": {\n        \"depositFees\": \"0.000237\",\n        \"instantWithdrawDstPublicKey\": \"cdea137cc5a43defb707ba87ede6adfa0b1f560bf673bb804fcd5743f41353a5492a17aa3dc05b9941bf4c59a63999a1d266943a5115fd1c60cd28e5df45abf9\",\n        \"instantWithdrawalFees\": [\n            [\n                1000,\n                0.005\n            ],\n            [\n                500,\n                0.01\n            ],\n            [\n                0,\n                0.02\n            ]\n        ],\n        \"tradeMakerFeeRate\": \"0.00015000\",\n        \"tradeTakerFeeRate\": \"0.00045000\",\n        \"transferFeeRate\": \"0.00010000\",\n        \"withdrawalFees\": \"0.000237\"\n    },\n    \"futureContracts\": [\n        {\n            \"displayName\": \"BTC/USDT Perps\",\n            \"id\": 2,\n            \"live\": true,\n            \"minNotional\": \"1\",\n            \"minOrderSize\": \"0.0000000001\",\n            \"orderbookGranularities\": [\n                \"0.1\",\n                \"1\",\n                \"10\",\n                \"100\"\n            ],\n            \"initialMarginRate\": \"0.500000\",\n            \"maintenanceMarginRate\": \"0.400000\",\n            \"settlementDecimals\": 6,\n            \"settlementSymbol\": \"USDT\",\n            \"stepSize\": \"0.0000000001\",\n            \"symbol\": \"BTC/USDT-P\",\n            \"tickSize\": \"0.00001\",\n            \"underlyingDecimals\": 10,\n            \"underlyingSymbol\": \"BTC\",\n            \"marketCreationTimestamp\": \"1727701319.73488\"\n        },\n        {\n            \"displayName\": \"ETH/USDT Perps\",\n            \"id\": 1,\n            \"live\": true,\n            \"minNotional\": \"1\",\n            \"minOrderSize\": \"0.000000001\",\n            \"orderbookGranularities\": [\n                \"0.01\",\n                \"0.1\",\n                \"1\",\n                \"10\"\n            ],\n            \"initialMarginRate\": \"0.500000\",\n            \"maintenanceMarginRate\": \"0.400000\",\n            \"settlementDecimals\": 6,\n            \"settlementSymbol\": \"USDT\",\n            \"stepSize\": \"0.000000001\",\n            \"symbol\": \"ETH/USDT-P\",\n            \"tickSize\": \"0.000001\",\n            \"underlyingDecimals\": 9,\n            \"underlyingSymbol\": \"ETH\",\n            \"marketCreationTimestamp\": \"1727701319.73488\"\n        },\n        {\n            \"displayName\": \"SOL/USDT Perps\",\n            \"id\": 3,\n            \"live\": true,\n            \"minNotional\": \"1\",\n            \"minOrderSize\": \"0.00000001\",\n            \"orderbookGranularities\": [\n                \"0.001\",\n                \"0.01\",\n                \"0.1\",\n                \"1\"\n            ],\n            \"initialMarginRate\": \"0.500000\",\n            \"maintenanceMarginRate\": \"0.400000\",\n            \"settlementDecimals\": 6,\n            \"settlementSymbol\": \"USDT\",\n            \"stepSize\": \"0.00000001\",\n            \"symbol\": \"SOL/USDT-P\",\n            \"tickSize\": \"0.0000001\",\n            \"underlyingDecimals\": 8,\n            \"underlyingSymbol\": \"SOL\",\n            \"marketCreationTimestamp\": \"1727701319.73488\"\n        }\n    ],\n    \"maintenanceWindow\": [],\n    \"status\": \"NORMAL\"\n}"}],"_postman_id":"183981da-8df5-40a0-a155-da15015dd536"},{"name":"/market/inventory","id":"85b3dfe2-0cdc-42c9-8d71-aa38e4b3edda","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/inventory","description":"<h4 id=\"usage\">Usage</h4>\n<p>Similar to <code>/market/exchange-info</code>, except in addition to the contract metadata this endpoint will return price information</p>\n","urlObject":{"path":["market","inventory"],"host":["https://data-api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"70674652-c056-404d-bb79-1a130a62d23d","name":"Example","originalRequest":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/inventory"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:48:20 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=uYnRZSw6ZXJlmG7TrlSxARR9SF2HuCpw2tLegFsdtL3+AnQhLQPxEQkUBIfDePqm16EFjYxRZ7rs5w1pKj3jfGem2S9f98+qkTJbWu7WY59ScULWnXicCQVvmHGN; Expires=Tue, 16 Apr 2024 19:48:20 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=uYnRZSw6ZXJlmG7TrlSxARR9SF2HuCpw2tLegFsdtL3+AnQhLQPxEQkUBIfDePqm16EFjYxRZ7rs5w1pKj3jfGem2S9f98+qkTJbWu7WY59ScULWnXicCQVvmHGN; Expires=Tue, 16 Apr 2024 19:48:20 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d039ba82553ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"feeConfig\": {\n        \"depositFees\": \"0.000237\",\n        \"instantWithdrawDstPublicKey\": \"cdea137cc5a43defb707ba87ede6adfa0b1f560bf673bb804fcd5743f41353a5492a17aa3dc05b9941bf4c59a63999a1d266943a5115fd1c60cd28e5df45abf9\",\n        \"instantWithdrawalFees\": [\n            [\n                1000,\n                0.005\n            ],\n            [\n                500,\n                0.01\n            ],\n            [\n                0,\n                0.02\n            ]\n        ],\n        \"tradeMakerFeeRate\": \"0.00015000\",\n        \"tradeTakerFeeRate\": \"0.00045000\",\n        \"transferFeeRate\": \"0.00010000\",\n        \"withdrawalFees\": \"0.000237\"\n    },\n    \"markets\": [\n        {\n            \"contract\": {\n                \"displayName\": \"BTC/USDT Perps\",\n                \"id\": 2,\n                \"live\": true,\n                \"minNotional\": \"1\",\n                \"minOrderSize\": \"0.0000000001\",\n                \"orderbookGranularities\": [\n                    \"0.1\",\n                    \"1\",\n                    \"10\",\n                    \"100\"\n                ],\n                \"initialMarginRate\": \"0.500000\",\n                \"maintenanceMarginRate\": \"0.400000\",\n                \"settlementDecimals\": 6,\n                \"settlementSymbol\": \"USDT\",\n                \"stepSize\": \"0.0000000001\",\n                \"symbol\": \"BTC/USDT-P\",\n                \"tickSize\": \"0.00001\",\n                \"underlyingDecimals\": 10,\n                \"underlyingSymbol\": \"BTC\"\n            },\n            \"info\": {\n                \"category\": null,\n                \"markPrice\": \"60688.14161\",\n                \"price24hAgo\": \"62220.01831\",\n                \"priceLatest\": \"60638.78740\",\n                \"tags\": []\n            }\n        },\n        {\n            \"contract\": {\n                \"displayName\": \"ETH/USDT Perps\",\n                \"id\": 1,\n                \"live\": true,\n                \"minNotional\": \"1\",\n                \"minOrderSize\": \"0.000000001\",\n                \"orderbookGranularities\": [\n                    \"0.01\",\n                    \"0.1\",\n                    \"1\",\n                    \"10\"\n                ],\n                \"initialMarginRate\": \"0.500000\",\n                \"maintenanceMarginRate\": \"0.400000\",\n                \"settlementDecimals\": 6,\n                \"settlementSymbol\": \"USDT\",\n                \"stepSize\": \"0.000000001\",\n                \"symbol\": \"ETH/USDT-P\",\n                \"tickSize\": \"0.000001\",\n                \"underlyingDecimals\": 9,\n                \"underlyingSymbol\": \"ETH\"\n            },\n            \"info\": {\n                \"category\": null,\n                \"markPrice\": \"2371.199740\",\n                \"price24hAgo\": \"2443.006397\",\n                \"priceLatest\": \"2367.785983\",\n                \"tags\": []\n            }\n        },\n        {\n            \"contract\": {\n                \"displayName\": \"SOL/USDT Perps\",\n                \"id\": 3,\n                \"live\": true,\n                \"minNotional\": \"1\",\n                \"minOrderSize\": \"0.00000001\",\n                \"orderbookGranularities\": [\n                    \"0.001\",\n                    \"0.01\",\n                    \"0.1\",\n                    \"1\"\n                ],\n                \"initialMarginRate\": \"0.500000\",\n                \"maintenanceMarginRate\": \"0.400000\",\n                \"settlementDecimals\": 6,\n                \"settlementSymbol\": \"USDT\",\n                \"stepSize\": \"0.00000001\",\n                \"symbol\": \"SOL/USDT-P\",\n                \"tickSize\": \"0.0000001\",\n                \"underlyingDecimals\": 8,\n                \"underlyingSymbol\": \"SOL\"\n            },\n            \"info\": {\n                \"category\": null,\n                \"markPrice\": \"139.6038176\",\n                \"price24hAgo\": \"143.5201703\",\n                \"priceLatest\": \"139.4504197\",\n                \"tags\": []\n            }\n        }\n    ]\n}"}],"_postman_id":"85b3dfe2-0cdc-42c9-8d71-aa38e4b3edda"}],"id":"b5c6a3bc-243d-4d35-b6d4-a74c92495434","description":"<p>The exchange listings endpoints expose all markets that are currently listed on Hibachi with their relevant market info.</p>\n<p>The primary API endpoint is<code>/market/exchange-info</code> which exposes the raw markets and their trading configuration and also fees information associated with the Hibachi exchange. The <code>status</code> field in this endpoint can have the values \"LIVE\", \"PAUSED\", or \"CLOSED\".</p>\n<p>.</p>\n<p>There is an additional <code>/market/inventory</code> endpoint which is aimed primarily for client side usage and exposes some loose market stats (like 24h percentage change) in addition to the raw configs.</p>\n<p>We recommend using <code>/market/exchange-info</code> for any automated trading activity, since its latency does not get affected by supplemental stats.</p>\n<p>If you're looking to get specific stats on markets, the <a href=\"#8c09fb5e-6403-411e-9fba-3a97bf8dd255\">Market Data endpoints</a> are much more comprehensive and better suited for such a use case.</p>\n<h2 id=\"asset-quantities\">Asset Quantities</h2>\n<p>All quantities on Hibachi are represented internally as <strong>64-bit numbers</strong>.</p>\n<p>In order to enable trading fractional quantities (e.g. <code>0.01 BTC</code>), each asset on Hibachi as a specific fixed number of decimals.</p>\n<p><strong>Example</strong>:</p>\n<ul>\n<li><p><code>BTC</code> may be represented with 10 decimals</p>\n</li>\n<li><p>This means <code>1 BTC</code> is stored as <code>1 x 10^10 = 10,000,000</code> quantity on the exchange.</p>\n</li>\n</ul>\n<p>When making trades, querying positions and similar, Hibachi will still expose and expect numbers as \"real\" float strings (e.g. <code>\"quantity: 1.0\"</code> for <code>1 BTC</code>).</p>\n<p>This way, users don't need to constantly convert numbers in order to be able to reason about them. However, this <code>quantity</code> notation is important when:</p>\n<ol>\n<li><p>Signing any operations (trades, withdrawals, etc) since we want the traders to specify exactly what they want to trade and not leave room for misinterpretations. Please make sure to use correct fees when signinging , otherwise, the request will be rejected.</p>\n</li>\n<li><p>Interacting with the Hibachi smart contracts</p>\n</li>\n</ol>\n<p>The number of decimals is exposed for each contract in the <code>/market/exchange-info</code> endpoint response under the <code>underlyingDecimals</code> field.</p>\n<h2 id=\"asset-prices\">Asset Prices</h2>\n<p>Like quantities, asset prices are also <strong>64-bit numbers</strong> that conform to decimals. Prices are used when converting between underlying and settlement token in a market.</p>\n<p>For example, on <code>BTC/USDT-P</code> a price of <code>100,000</code> may be used in a limit order to indicate that somebody is wiling to sell <code>BTC</code> for <code>100,000 USDT</code> per <code>BTC</code>. Price is always denoted in units of the <code>settlementAsset</code>.</p>\n<p>Since both the underlying and settlement assets have unique quantity decimals, the price is stored in the difference between both decimals (<code>settlementDecimals - underlyingDecimals</code>).</p>\n<p>In order to support higher resolution of prices, an additional <strong>price multiplier of</strong> <strong><code>2^32</code></strong> is used to represent prices as fixed-point decimals with 32 bits after the decimal point.</p>\n<p><strong>Example:</strong></p>\n<ul>\n<li><p>Let's assume somebody wants to sell <code>BTC/USDT-P</code> for <code>100,000 USDT per BTC</code></p>\n</li>\n<li><p>In this case, <code>/exchange-info</code> endpoint for this market has returned</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"symbol\": \"BTC/USDT-P\",\n  \"id\": 2,\n  \"underlyingDecimals\": 10,\n  \"underlyingSymbol\": \"BTC\",\n  \"settlementDecimals\": 6,\n  \"settlementSymbol\": \"USDT\",\n}\n\n</code></pre>\n<ul>\n<li><p>This means that <code>settlementDecimals - underlyingDecimals = 6 - 10 = -4</code></p>\n</li>\n<li><p>Converting our price of <code>100,000 USDT</code> can be done using</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">price_hibachi = price_raw x 10^(settlement_decimals - underlying_decimals) x price_multiplier\npirce_hibachi = 100,000 x 10^(6 - 10 = -4) x 2^32 = 42949672960\n\n</code></pre>\n<h2 id=\"fees\"><strong>Fees</strong></h2>\n<p>Hibachi charges fees for the following actions:</p>\n<ul>\n<li><p><strong>Trade</strong>: Fees are based on the notional value of an execution. Makers and takers pay different rates; tradeMakerFeeRate in the returned JSON indicates the rate for makers and tradeTakerFeeRate indicates the rate for takers. Hibachi determines the maker/taker status based on which side is the sitting order in the match, the sitting order side would be maker. Rates from <code>/exchange-info</code> are in units of 1, so 0.0002 means 0.02%. When signing orders, clients should use the maximum of tradeTakerFeeRate and tradeMakerFeeRate. Hibachi will charge a corresponding rate based on the taker/maker side of the trade.</p>\n</li>\n<li><p><strong>Transfer</strong>: Fees are based on the notional value of a transfer, with the rate specified by transferFeeRate from <code>/exchange-info</code>. The unit is 1 , so 0.0001 means 1 basis point (0.01%).</p>\n</li>\n<li><p><strong>Deposit</strong> : Hibachi charges fees to cover the gas costs for relaying deposits. The value (depositFees) from <code>/exchange-info</code> is in units of 1 USDT. Self-managed accounts are exempt from this fee. These fees vary dynamically with current gas fees and ether prices. Client should use some value like 1.2 x depositFees as the gast cost could change, Hibachi will charge the actual cost.</p>\n</li>\n<li><p><strong>Withdrawal</strong>: Hibachi charges fees to cover the gas costs for relaying withdrawals. The value (withdrawal fees) from <code>/exchange-info</code> is in units of 1 USDT, so 1.369258 means 1.369258 USDT. These fees also vary dynamically with current gas fees and ether prices. Client should use some value like 1.2 x depositFees as the gast cost could change, Hibachi will charge the actual cost.</p>\n</li>\n<li><p><strong>Instant withdrawal Fees</strong>:<br />  1. We provide the instantWithdrawDstPublicKey in feeConfig, you need to use this for the instant withdrawal request.<br />  2. instantWithdrawalFees provides fee information. The instantWithdrawalFees has a list of [threshold, rates]. Clients should use the maxium one that withdrawed quantity &gt;= threshold, for example, in the example below, if the withdraw quanity is 2000, we should use 0.005 as the fee; if the withdraw quantity is 500, we should use 0.01.</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">    \"feeConfig\": {\n        \"depositFees\": \"0.293585\",\n        \"instantWithdrawDstPublicKey\": \"88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\",\n        \"instantWithdrawalFees\": [\n            [\n                1000,\n                0.005\n            ],\n            [\n                500,\n                0.01\n            ],\n            [\n                0,\n                0.02\n            ]\n        ],\n        \"tradeMakerFeeRate\": \"0.00020000\",\n        \"tradeTakerFeeRate\": \"0.00050000\",\n        \"transferFeeRate\": \"0.00010000\",\n        \"withdrawalFees\": \"0.293585\"\n    },\n\n</code></pre>\n","_postman_id":"b5c6a3bc-243d-4d35-b6d4-a74c92495434"},{"name":"Market Data","item":[{"name":"/market/data/prices","id":"bca696ca-b9b2-4072-8864-5d6b8c09807e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/data/prices?symbol=ETH/USDT-P","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the price and funding information for a future contract.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li><code>symbol</code>: the symbol of the contract you get in the response from <code>/market/exchange-info</code> endpoint</li>\n</ul>\n","urlObject":{"path":["market","data","prices"],"host":["https://data-api-staging.hibachi.xyz"],"query":[{"key":"symbol","value":"ETH/USDT-P"}],"variable":[]}},"response":[{"id":"700dd81f-dbed-472a-b18b-2e44fb7aab99","name":"Example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://data-api-staging.hibachi.xyz/market/data/prices?symbol=ETH/USDT-P","host":["https://data-api-staging.hibachi.xyz"],"path":["market","data","prices"],"query":[{"key":"symbol","value":"ETH/USDT-P"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:48:47 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=s+rdTBFxH6pL8Trl30nsqzI2HjTH883MYI4t3cAIC9gyPYQv/sQo/I4qfeHjigtGHA3flwHNUpU75PFfF/wy10ymqmeNObxUilV8dhfjH9aTkgUnDoh+WyYgGZUQ; Expires=Tue, 16 Apr 2024 19:48:47 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=s+rdTBFxH6pL8Trl30nsqzI2HjTH883MYI4t3cAIC9gyPYQv/sQo/I4qfeHjigtGHA3flwHNUpU75PFfF/wy10ymqmeNObxUilV8dhfjH9aTkgUnDoh+WyYgGZUQ; Expires=Tue, 16 Apr 2024 19:48:47 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d04478d0853ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"askPrice\": \"3514.650296\",\n    \"bidPrice\": \"3513.596112\",\n    \"fundingRateEstimation\": {\n        \"estimatedFundingRate\": \"0.000001\",\n        \"nextFundingTimestamp\": 1712707200\n    },\n    \"markPrice\": \"3514.288858\",\n    \"spotPrice\": \"3514.715000\",\n    \"symbol\": \"ETH/USDT-P\",\n    \"tradePrice\": \"2372.746570\"\n}"}],"_postman_id":"bca696ca-b9b2-4072-8864-5d6b8c09807e"},{"name":"/market/data/stats","id":"0064ca53-a2d0-41b9-8ade-6b2abf4ccb12","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/data/stats?symbol=ETH/USDT-P","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get general trading stats like 24h high/low/volume for a future contract.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li><code>symbol</code>: the symbol of the contrat you get in the response from <code>/market/exchange-info</code> endpoint</li>\n</ul>\n","urlObject":{"path":["market","data","stats"],"host":["https://data-api-staging.hibachi.xyz"],"query":[{"key":"symbol","value":"ETH/USDT-P"}],"variable":[]}},"response":[{"id":"6368b722-2447-4734-a9ab-114883eb7863","name":"Example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://data-api-staging.hibachi.xyz/market/data/stats?symbol=ETH/USDT-P","host":["https://data-api-staging.hibachi.xyz"],"path":["market","data","stats"],"query":[{"key":"symbol","value":"ETH/USDT-P"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:48:47 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=s+rdTBFxH6pL8Trl30nsqzI2HjTH883MYI4t3cAIC9gyPYQv/sQo/I4qfeHjigtGHA3flwHNUpU75PFfF/wy10ymqmeNObxUilV8dhfjH9aTkgUnDoh+WyYgGZUQ; Expires=Tue, 16 Apr 2024 19:48:47 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=s+rdTBFxH6pL8Trl30nsqzI2HjTH883MYI4t3cAIC9gyPYQv/sQo/I4qfeHjigtGHA3flwHNUpU75PFfF/wy10ymqmeNObxUilV8dhfjH9aTkgUnDoh+WyYgGZUQ; Expires=Tue, 16 Apr 2024 19:48:47 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d04478d0853ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"high24h\": \"3819.507827\",\n    \"low24h\": \"3754.474162\",\n    \"symbol\": \"ETH/USDT-P\",\n    \"volume24h\": \"23554.858590416\"\n}"}],"_postman_id":"0064ca53-a2d0-41b9-8ade-6b2abf4ccb12"},{"name":"/market/data/trades","id":"86a53bc1-d3bb-4b93-8a11-7034d4698caa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/data/trades?symbol=ETH/USDT-P","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the most recent trades from all users for one future contract.</p>\n<p>It will return most recent up to 100 records.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li><code>symbol</code>: the symbol of the contrat you get in the response from <code>/market/exchange-info</code> endpoint</li>\n</ul>\n","urlObject":{"path":["market","data","trades"],"host":["https://data-api-staging.hibachi.xyz"],"query":[{"key":"symbol","value":"ETH/USDT-P"}],"variable":[]}},"response":[{"id":"c2ef3c8e-5a9d-4174-9a9f-a7dc3f75d685","name":"Example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://data-api-staging.hibachi.xyz/market/data/trades?symbol=ETH/USDT-P","host":["https://data-api-staging.hibachi.xyz"],"path":["market","data","trades"],"query":[{"key":"symbol","value":"ETH/USDT-P"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:49:10 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=gylVDILASAX4rnztvBIxWWIA6Cszj9Qcvcolt7zbFTEjT9RsO16qu89QyrTrqvqF2/qsEcrRj/31vEwVA41m1ghvQKD/0WucwmW/s/bLsDJUQ1Y87tjwIbTmaHsg; Expires=Tue, 16 Apr 2024 19:49:10 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=gylVDILASAX4rnztvBIxWWIA6Cszj9Qcvcolt7zbFTEjT9RsO16qu89QyrTrqvqF2/qsEcrRj/31vEwVA41m1ghvQKD/0WucwmW/s/bLsDJUQ1Y87tjwIbTmaHsg; Expires=Tue, 16 Apr 2024 19:49:10 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d04d288ab53ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"trades\": [\n        {\n            \"price\": \"3512.431902\",\n            \"quantity\": \"1.414780098\",\n            \"takerSide\": \"Buy\",\n            \"timestamp\": 1712692147\n        },\n        {\n            \"price\": \"3512.783321\",\n            \"quantity\": \"1.138242707\",\n            \"takerSide\": \"Sell\",\n            \"timestamp\": 1712692147\n        }\n    ]\n}"}],"_postman_id":"86a53bc1-d3bb-4b93-8a11-7034d4698caa"},{"name":"/market/data/klines","id":"4f0eacec-c61e-4d51-afb3-23c51c2c6bac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/data/klines?symbol=ETH/USDT-P&interval=1h&fromMs=&toMs=","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the candlesticks for a futures contract.</p>\n<h4 id=\"required-query-parameters\">Required Query Parameters</h4>\n<ul>\n<li><p><code>symbol</code>: the symbol of the contrat you get in the response from <code>/market/exchange-info</code> endpoint</p>\n</li>\n<li><p><code>interval</code>: Supported intervals: <code>1min</code>, <code>5min</code>, <code>15min</code>, <code>1h</code>, <code>4h</code>, <code>1d</code>, <code>1w</code>.</p>\n</li>\n</ul>\n<h4 id=\"optional-query-parameters\">Optional Query Parameters</h4>\n<ul>\n<li><p><code>fromMs</code>: the start time in Unix millisecond timestamp of the period you want to retrieve candlesticks</p>\n</li>\n<li><p><code>toMs</code>: the end time in Unix milisecond timestamp of the period you want to retrieve candlesticks</p>\n</li>\n</ul>\n","urlObject":{"path":["market","data","klines"],"host":["https://data-api-staging.hibachi.xyz"],"query":[{"key":"symbol","value":"ETH/USDT-P"},{"key":"interval","value":"1h"},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"fromMs","value":""},{"description":{"content":"<p>Optional</p>\n","type":"text/plain"},"key":"toMs","value":""}],"variable":[]}},"response":[{"id":"972c1551-e8a3-4707-b4b1-4a9fdcf5a49e","name":"Example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://data-api-staging.hibachi.xyz/market/data/klines?symbol=ETH/USDT-P&interval=1h","host":["https://data-api-staging.hibachi.xyz"],"path":["market","data","klines"],"query":[{"key":"symbol","value":"ETH/USDT-P"},{"key":"interval","value":"1h"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:49:35 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=AnCuowFNO0ftGG6a5dgISanB/Q7MRYDwPmSfXN/wW7pk3j/+17q09hJ5z7l3DKiyo7IaXeo1i6pJvvgk9Rp8EAzg9kupjO5D9e316QOdC9BB+XeY7Nd/I2fqd4QT; Expires=Tue, 16 Apr 2024 19:49:35 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=AnCuowFNO0ftGG6a5dgISanB/Q7MRYDwPmSfXN/wW7pk3j/+17q09hJ5z7l3DKiyo7IaXeo1i6pJvvgk9Rp8EAzg9kupjO5D9e316QOdC9BB+XeY7Nd/I2fqd4QT; Expires=Tue, 16 Apr 2024 19:49:35 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d056f3ffb53ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"klines\": [\n        {\n            \"close\": \"3704.751036\",\n            \"high\": \"3716.530378\",\n            \"interval\": \"1h\",\n            \"low\": \"3699.627883\",\n            \"open\": \"3716.406894\",\n            \"timestamp\": 1712628000,\n            \"volumeNotional\": \"1637355.846362\"\n        },\n        {\n            \"close\": \"3693.029781\",\n            \"high\": \"3717.863717\",\n            \"interval\": \"1h\",\n            \"low\": \"3682.131347\",\n            \"open\": \"3706.001256\",\n            \"timestamp\": 1712631600,\n            \"volumeNotional\": \"3590375.750775\"\n        }\n    ]\n}"}],"_postman_id":"4f0eacec-c61e-4d51-afb3-23c51c2c6bac"},{"name":"/market/data/open-interest","id":"bc34e8ae-e094-4802-8d56-3efe3a7bad49","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/data/open-interest?symbol=ETH/USDT-P","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the open interest for one futures contract.</p>\n<p>It will return the total open interest from each side.</p>\n<h4 id=\"required-query-parameter\">Required Query Parameter</h4>\n<ul>\n<li><code>symbol</code>: the symbol of the contrat you get in the response from <code>/market/exchange-info</code> endpoint</li>\n</ul>\n","urlObject":{"path":["market","data","open-interest"],"host":["https://data-api-staging.hibachi.xyz"],"query":[{"key":"symbol","value":"ETH/USDT-P"}],"variable":[]}},"response":[{"id":"0246a44e-1f0d-4cd1-93b0-ffa9f51a49a8","name":"Example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://data-api-staging.hibachi.xyz/market/data/open-interest?symbol=ETH/USDT-P","host":["https://data-api-staging.hibachi.xyz"],"path":["market","data","open-interest"],"query":[{"key":"symbol","value":"ETH/USDT-P"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:49:56 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=vx+edEHAA45zQK4M4Z4ofSvMT04khzBQx6ZaXzVe1nTyzlmneV5DddbGEWjYegmlKPNNku8z0a1ijKzYRLZpSOcizw01JN8piyCNAKcE8sGbIiQHfTYXxtE+/Wzm; Expires=Tue, 16 Apr 2024 19:49:56 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=vx+edEHAA45zQK4M4Z4ofSvMT04khzBQx6ZaXzVe1nTyzlmneV5DddbGEWjYegmlKPNNku8z0a1ijKzYRLZpSOcizw01JN8piyCNAKcE8sGbIiQHfTYXxtE+/Wzm; Expires=Tue, 16 Apr 2024 19:49:56 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d05f59e7453ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"totalQuantity\": \"6.326719254\"\n}"}],"_postman_id":"bc34e8ae-e094-4802-8d56-3efe3a7bad49"},{"name":"/market/data/orderbook","id":"c7a64b0d-9e37-4009-93e5-2aa12e8d7e9b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/data/orderbook?symbol=ETH/USDT-P&depth=3&granularity=0.01","description":"<h4 id=\"usage\">Usage</h4>\n<p>Get the orderbook price levels.</p>\n<p>It will return up to <code>depth</code> price levels on both side. The price level will be aggreated based on <code>granulairty</code>.</p>\n<h4 id=\"required-request-query-parameters\">Required Request Query Parameters</h4>\n<ul>\n<li><code>symbol</code>: the symbol of the contrat you get in the response from <code>/market/exchange-info</code> endpoint</li>\n</ul>\n<h4 id=\"optional-request-query-parameters\">Optional Request Query Parameters</h4>\n<ul>\n<li><p><code>depth</code> should be between 1 and 100, inclusive.</p>\n</li>\n<li><p><code>granularity</code> should be one of the values in <code>orderbookGranularities</code> returned by <code>market/exchange-info</code>. Different contracts may have different <code>orderbookGranularities</code>.</p>\n</li>\n</ul>\n","urlObject":{"path":["market","data","orderbook"],"host":["https://data-api-staging.hibachi.xyz"],"query":[{"key":"symbol","value":"ETH/USDT-P"},{"key":"depth","value":"3"},{"key":"granularity","value":"0.01"}],"variable":[]}},"response":[{"id":"516787d4-e784-4219-b9f9-23967d210afe","name":"Example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://data-api-staging.hibachi.xyz/market/data/orderbook?symbol=ETH/USDT-P&depth=3&granularity=0.01","host":["https://data-api-staging.hibachi.xyz"],"path":["market","data","orderbook"],"query":[{"key":"symbol","value":"ETH/USDT-P"},{"key":"depth","value":"3"},{"key":"granularity","value":"0.01"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 09 Apr 2024 19:50:44 GMT","enabled":true},{"key":"Content-Type","value":"application/json","enabled":true},{"key":"Transfer-Encoding","value":"chunked","enabled":true},{"key":"Connection","value":"keep-alive","enabled":true},{"key":"set-cookie","value":"AWSALB=uJUdt/dupAikg5HjVq3+wKgeQmwZ1EDMCnKFC1H8Qq5aMFxH1borNxrRwryiCv+4KkEd0BWkwaZVekAr17fRjwq9tpKN8HJZruGUCOhtDRQiHtvPBZen35qA9KBK; Expires=Tue, 16 Apr 2024 19:50:44 GMT; Path=/","enabled":true},{"key":"set-cookie","value":"AWSALBCORS=uJUdt/dupAikg5HjVq3+wKgeQmwZ1EDMCnKFC1H8Qq5aMFxH1borNxrRwryiCv+4KkEd0BWkwaZVekAr17fRjwq9tpKN8HJZruGUCOhtDRQiHtvPBZen35qA9KBK; Expires=Tue, 16 Apr 2024 19:50:44 GMT; Path=/; SameSite=None; Secure","enabled":true},{"key":"access-control-allow-origin","value":"*","enabled":true},{"key":"vary","value":"origin, access-control-request-method, access-control-request-headers","enabled":true},{"key":"Content-Encoding","value":"gzip","enabled":true},{"key":"CF-Cache-Status","value":"DYNAMIC","enabled":true},{"key":"X-Content-Type-Options","value":"nosniff","enabled":true},{"key":"Server","value":"cloudflare","enabled":true},{"key":"CF-RAY","value":"871d071e1a2d53ea-ATL","enabled":true}],"cookie":[],"responseTime":null,"body":"{\n    \"ask\": {\n        \"endPrice\": \"3512.63\",\n        \"levels\": [\n            {\n                \"price\": \"3511.93\",\n                \"quantity\": \"0.284772482\"\n            },\n            {\n                \"price\": \"3512.28\",\n                \"quantity\": \"0.569544964\"\n            },\n            {\n                \"price\": \"3512.63\",\n                \"quantity\": \"0.854317446\"\n            }\n        ],\n        \"startPrice\": \"3511.93\"\n    },\n    \"bid\": {\n        \"endPrice\": \"3510.87\",\n        \"levels\": [\n            {\n                \"price\": \"3515.39\",\n                \"quantity\": \"2.345153070\"\n            },\n            {\n                \"price\": \"3511.22\",\n                \"quantity\": \"0.284772482\"\n            },\n            {\n                \"price\": \"3510.87\",\n                \"quantity\": \"0.569544964\"\n            }\n        ],\n        \"startPrice\": \"3515.39\"\n    }\n}"}],"_postman_id":"c7a64b0d-9e37-4009-93e5-2aa12e8d7e9b"},{"name":"/market/data/funding-rates","id":"079586af-0d94-41ea-99bb-7afcd93bf438","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/market/data/funding-rates?symbol=BTC/USDT-P&startTime=1756512000&endTime=1757088000&limit=20","description":"<p>Get the funding rate.</p>\n<p>It will return historical <strong>funding rates</strong> and index prices for a given futures contract.</p>\n<p>Notes:</p>\n<ul>\n<li><p><strong><code>symbol</code></strong> <em>(string, required)</em> – The trading pair symbol (e.g., \"BTC/USDT-P\").</p>\n</li>\n<li><p><strong><code>startTime</code></strong> <em>(integer, optional)</em> – Unix timestamp in <strong>seconds</strong> (with optional fractional part) specifying the start of the query window.</p>\n<ul>\n<li>Default: 7 days ago</li>\n</ul>\n</li>\n<li><p><strong><code>endTime</code></strong> <em>(integer, optional)</em> – Unix timestamp in <strong>seconds</strong> (with optional fractional part) specifying the end of the query window.</p>\n<ul>\n<li>Default: current server time</li>\n</ul>\n</li>\n<li><p><strong><code>limit</code></strong> <em>(integer, optional)</em> – Maximum number of results to return.</p>\n<ul>\n<li><p>Range: 1–100</p>\n</li>\n<li><p>Default: 50</p>\n</li>\n</ul>\n</li>\n<li><p><strong><code>offset</code></strong> <em>(integer, optional)</em> – Number of results to skip before starting to return data.</p>\n<ul>\n<li>Default: 0</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["market","data","funding-rates"],"host":["https://data-api-staging.hibachi.xyz"],"query":[{"key":"symbol","value":"BTC/USDT-P"},{"key":"startTime","value":"1756512000"},{"key":"endTime","value":"1757088000"},{"key":"limit","value":"20"}],"variable":[]}},"response":[{"id":"736ec4de-d4c8-47af-840c-9c668e9ed1b5","name":"example","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://data-api-staging.hibachi.xyz/market/data/funding-rates?symbol=BTC/USDT-P&startTime=1756512000&endTime=1757088000&limit=20","host":["https://data-api-staging.hibachi.xyz"],"path":["market","data","funding-rates"],"query":[{"key":"symbol","value":"BTC/USDT-P"},{"key":"startTime","value":"1756512000"},{"key":"endTime","value":"1757088000"},{"key":"limit","value":"20"}]}},"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"079586af-0d94-41ea-99bb-7afcd93bf438"},{"name":"/exchange/utc-timestamp","id":"3277e546-4cb0-4d30-a832-717af0de9b20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/exchange/utc-timestamp","description":"<h3 id=\"get-current-utc-timestamp\"><strong>Get Current UTC Timestamp</strong></h3>\n<p>Fetch the current UTC timestamp in <strong>milliseconds</strong>.</p>\n<p>This can be used for client-side time synchronization, request signing, or latency checks.</p>\n","urlObject":{"path":["exchange","utc-timestamp"],"host":["https://data-api-staging.hibachi.xyz"],"query":[],"variable":[]}},"response":[{"id":"8eadc75e-221c-4383-b8a8-4b19cde39ab4","name":"example","originalRequest":{"method":"GET","header":[],"url":"https://data-api-staging.hibachi.xyz/exchange/utc-timestamp"},"_postman_previewlanguage":"Text","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"timestampMs\": 1757118802487\n}"}],"_postman_id":"3277e546-4cb0-4d30-a832-717af0de9b20"}],"id":"4abb30c4-e5c7-4b0f-9ade-790111dbfa47","description":"<h2 id=\"order-book\">Order book</h2>\n<p>You can obtain order book data using the <code>/market/data/orderbook</code> endpoint.</p>\n<p>The parameters are:</p>\n<ul>\n<li><p><code>symbol</code> (string)</p>\n</li>\n<li><p><code>depth</code> (optional 32-bit unsigned integer representing the number of levels to query)</p>\n</li>\n<li><p><code>granularity</code> (optional string representing the precision of the levels returned)</p>\n<ul>\n<li>For example, you can use a granularity of 0.01 to obtains levels separated by 0.01 in price.</li>\n</ul>\n</li>\n</ul>\n<p>For example, you can query <code>/market/data/orderbook?symbol=ETH/USDT-P&amp;depth=3&amp;granularity=0.01</code> and you will receive a response such as the following:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"ask\": {\n        \"endPrice\": \"3060.85\",\n        \"levels\": [\n            {\n                \"price\": \"3060.23\",\n                \"quantity\": \"0.073006381\"\n            },\n            {\n                \"price\": \"3060.53\",\n                \"quantity\": \"0.179959398\"\n            },\n            {\n                \"price\": \"3060.85\",\n                \"quantity\": \"0.110626584\"\n            }\n        ],\n        \"startPrice\": \"3060.23\"\n    },\n    \"bid\": {\n        \"endPrice\": \"3058.39\",\n        \"levels\": [\n            {\n                \"price\": \"3058.99\",\n                \"quantity\": \"0.012214857\"\n            },\n            {\n                \"price\": \"3058.68\",\n                \"quantity\": \"0.153802116\"\n            },\n            {\n                \"price\": \"3058.39\",\n                \"quantity\": \"0.171222708\"\n            }\n        ],\n        \"startPrice\": \"3058.99\"\n    }\n}\n\n</code></pre>\n<h2 id=\"open-interest\">Open interest</h2>\n<p>You can obtain open interest data using the <code>/market/data/open-interest</code> endpoint.</p>\n<p>Parameters:</p>\n<ul>\n<li><code>symbol</code> (string)</li>\n</ul>\n<p>For example, you can send an HTTP GET request to <code>/market/data/open-interest?symbol=ETH/USDT-P</code> and you will receive a response like</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"total_quantity\": \"0.113622416\"\n}\n\n</code></pre>\n","_postman_id":"4abb30c4-e5c7-4b0f-9ade-790111dbfa47"}],"id":"98d073b3-de4d-4e86-81cf-7cb4670da751","description":"<p>You can use Market API to query:</p>\n<ul>\n<li><p>Exchange Listings: <code>/market/exchange-info</code> (and optionally <code>/market/inventory</code>)</p>\n</li>\n<li><p>Market Data: <code>/market/data</code></p>\n</li>\n</ul>\n","_postman_id":"98d073b3-de4d-4e86-81cf-7cb4670da751"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","packages":{},"exec":[""],"id":"e30e1394-d082-4918-961f-a92b75347dbb"}},{"listen":"test","script":{"type":"text/javascript","packages":{},"exec":[""],"id":"91e52da8-d75d-436e-9845-217867020e9b"}}],"variable":[{"id":"54525ba0-9670-48fc-a526-7ed5e9cdf924","key":"api-url","value":"https://api-staging.hibachi.xyz"},{"id":"75efae4e-1922-4511-96cd-66f821737f57","key":"data-api-url","value":"https://data-api-staging.hibachi.xyz"},{"id":"2a4595e9-8bb5-4405-b054-7ca5a476b9f1","key":"api-url-ws","value":"wss://api-staging.hibachi.xyz"},{"id":"6803e2bf-d520-4b8c-8c1f-8220e616f572","key":"data-api-url-ws","value":"wss://data-api-staging.hibachi.xyz"}]}