{"note":"Generated by `go run ./sdk/generator contract` from the server's code path. Do not edit. The private key below is a published TEST key.","contract_version":"0.1.0","test_key":{"label":"keccak256(\"GRVT SDK TEST KEY - PUBLIC - NEVER FUND\")","private_key":"0xbfe25ff07bd38cb3fbc28a2a296d41aabd68a78c929d257935906489fc9c6d89","address":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5"},"cases":[{"name":"limit_order","description":"The standard first order: post-only GTT limit buy of 0.01 BTC_USDT_Perp at 60000 (600 USDT notional), Order type.","rpc":"order.create_order","inputs":{"wire_request":{"order":{"sub_account_id":"8289849667772468","is_market":false,"time_in_force":"GOOD_TILL_TIME","post_only":true,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.01","limit_price":"60000","is_buying_asset":true}],"signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":1001,"chain_id":"326"},"metadata":{"client_order_id":"1001"}}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"Order","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Order":[{"name":"subAccountID","type":"uint64"},{"name":"isMarket","type":"bool"},{"name":"timeInForce","type":"uint8"},{"name":"postOnly","type":"bool"},{"name":"reduceOnly","type":"bool"},{"name":"legs","type":"OrderLeg[]"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}],"OrderLeg":[{"name":"assetID","type":"uint256"},{"name":"contractSize","type":"uint64"},{"name":"limitPrice","type":"uint64"},{"name":"isBuyingContract","type":"bool"}]},"primaryType":"Order","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","isMarket":false,"legs":[{"assetID":"197889","contractSize":"10000000","isBuyingContract":true,"limitPrice":"60000000000000"}],"nonce":"1001","postOnly":true,"reduceOnly":false,"subAccountID":"8289849667772468","timeInForce":"1"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x0248f8af0c644bb95dfe45feed4897e787765ca0fb1bece6dd5e9e016feceee8","digest":"0x7f8fecb8997024f85a5a9a44730f79d2cef290688d6a022d8e98e95ccc1f98c9","r":"0x62b6d0047530e701aa06d4b7de9dca76916219b8561424bd246a519bdc31bf7d","s":"0x2447b83565fa6cac90c607e5c4a3f96cda386f92d7fb51f45dea12c2f8e09904","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1001,"r":"0x62b6d0047530e701aa06d4b7de9dca76916219b8561424bd246a519bdc31bf7d","s":"0x2447b83565fa6cac90c607e5c4a3f96cda386f92d7fb51f45dea12c2f8e09904","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"order":{"is_market":false,"legs":[{"instrument":"BTC_USDT_Perp","is_buying_asset":true,"limit_price":"60000","size":"0.01"}],"metadata":{"client_order_id":"1001"},"post_only":true,"reduce_only":false,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1001,"r":"0x62b6d0047530e701aa06d4b7de9dca76916219b8561424bd246a519bdc31bf7d","s":"0x2447b83565fa6cac90c607e5c4a3f96cda386f92d7fb51f45dea12c2f8e09904","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME"}}},"server":{"type":"Order","digest":"0x7f8fecb8997024f85a5a9a44730f79d2cef290688d6a022d8e98e95ccc1f98c9","scaled":{"legs[0].limit_price":"60000000000000","legs[0].size":"10000000"},"signature_accepted":true}},{"name":"market_order","description":"IOC market sell without limit_price (signed as 0).","rpc":"order.create_order","inputs":{"wire_request":{"order":{"sub_account_id":"8289849667772468","is_market":true,"time_in_force":"IMMEDIATE_OR_CANCEL","post_only":false,"reduce_only":true,"legs":[{"instrument":"ETH_USDT_Perp","size":"0.25","is_buying_asset":false}],"signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":1002,"chain_id":"326"},"metadata":{"client_order_id":"1002"}}},"metadata":{"instruments":[{"instrument":"ETH_USDT_Perp","instrument_hash":"0x030401","base":"ETH","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"Order","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Order":[{"name":"subAccountID","type":"uint64"},{"name":"isMarket","type":"bool"},{"name":"timeInForce","type":"uint8"},{"name":"postOnly","type":"bool"},{"name":"reduceOnly","type":"bool"},{"name":"legs","type":"OrderLeg[]"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}],"OrderLeg":[{"name":"assetID","type":"uint256"},{"name":"contractSize","type":"uint64"},{"name":"limitPrice","type":"uint64"},{"name":"isBuyingContract","type":"bool"}]},"primaryType":"Order","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","isMarket":true,"legs":[{"assetID":"197633","contractSize":"250000000","isBuyingContract":false,"limitPrice":"0"}],"nonce":"1002","postOnly":false,"reduceOnly":true,"subAccountID":"8289849667772468","timeInForce":"3"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x920e467fffbf8c5ab38e5571a60fe526f6b7d50da8cdcd5a345a7f1962b5471d","digest":"0xad740bcaef463a9de8c758bd333046188a986979fd9e05594d97d3c699ea28ce","r":"0x03bddbd82d2742258c35635c9fb924873d02427b03bf45a60f2412f05074a402","s":"0x5d7d0dbea5123b5cda796938a88b989e452d9c718673ed219c142274c94671f8","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1002,"r":"0x03bddbd82d2742258c35635c9fb924873d02427b03bf45a60f2412f05074a402","s":"0x5d7d0dbea5123b5cda796938a88b989e452d9c718673ed219c142274c94671f8","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"order":{"is_market":true,"legs":[{"instrument":"ETH_USDT_Perp","is_buying_asset":false,"size":"0.25"}],"metadata":{"client_order_id":"1002"},"post_only":false,"reduce_only":true,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1002,"r":"0x03bddbd82d2742258c35635c9fb924873d02427b03bf45a60f2412f05074a402","s":"0x5d7d0dbea5123b5cda796938a88b989e452d9c718673ed219c142274c94671f8","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468","time_in_force":"IMMEDIATE_OR_CANCEL"}}},"server":{"type":"Order","digest":"0xad740bcaef463a9de8c758bd333046188a986979fd9e05594d97d3c699ea28ce","scaled":{"legs[0].limit_price":"0","legs[0].size":"250000000"},"signature_accepted":true}},{"name":"multi_leg_order","description":"Two legs on different instruments; legs keep their order.","rpc":"order.create_order","inputs":{"wire_request":{"order":{"sub_account_id":"8289849667772468","is_market":false,"time_in_force":"FILL_OR_KILL","post_only":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.1","limit_price":"64000","is_buying_asset":true},{"instrument":"ETH_USDT_Perp","size":"2","limit_price":"3100.25","is_buying_asset":false}],"signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":1003,"chain_id":"326"},"metadata":{"client_order_id":"1003"}}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6},{"instrument":"ETH_USDT_Perp","instrument_hash":"0x030401","base":"ETH","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"Order","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Order":[{"name":"subAccountID","type":"uint64"},{"name":"isMarket","type":"bool"},{"name":"timeInForce","type":"uint8"},{"name":"postOnly","type":"bool"},{"name":"reduceOnly","type":"bool"},{"name":"legs","type":"OrderLeg[]"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}],"OrderLeg":[{"name":"assetID","type":"uint256"},{"name":"contractSize","type":"uint64"},{"name":"limitPrice","type":"uint64"},{"name":"isBuyingContract","type":"bool"}]},"primaryType":"Order","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","isMarket":false,"legs":[{"assetID":"197889","contractSize":"100000000","isBuyingContract":true,"limitPrice":"64000000000000"},{"assetID":"197633","contractSize":"2000000000","isBuyingContract":false,"limitPrice":"3100250000000"}],"nonce":"1003","postOnly":false,"reduceOnly":false,"subAccountID":"8289849667772468","timeInForce":"4"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0xea545f66ea30121ebfbfbe7a0cf636cbbfce7177e4d6c3bf053849f86ceba45e","digest":"0xb0ae02ef544b7dbccedb1cbb177f99a3803c4d496cde5c29357027e5b8970999","r":"0x6651a025d625efd67f47e221e7adf292c394d1f78d84d4fcdb2ccaf0072db293","s":"0x681cd3b053a6cbabde7866f9f962d78e48ce45fa8404f2065646cf9c64010704","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1003,"r":"0x6651a025d625efd67f47e221e7adf292c394d1f78d84d4fcdb2ccaf0072db293","s":"0x681cd3b053a6cbabde7866f9f962d78e48ce45fa8404f2065646cf9c64010704","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"order":{"is_market":false,"legs":[{"instrument":"BTC_USDT_Perp","is_buying_asset":true,"limit_price":"64000","size":"0.1"},{"instrument":"ETH_USDT_Perp","is_buying_asset":false,"limit_price":"3100.25","size":"2"}],"metadata":{"client_order_id":"1003"},"post_only":false,"reduce_only":false,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1003,"r":"0x6651a025d625efd67f47e221e7adf292c394d1f78d84d4fcdb2ccaf0072db293","s":"0x681cd3b053a6cbabde7866f9f962d78e48ce45fa8404f2065646cf9c64010704","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468","time_in_force":"FILL_OR_KILL"}}},"server":{"type":"Order","digest":"0xb0ae02ef544b7dbccedb1cbb177f99a3803c4d496cde5c29357027e5b8970999","scaled":{"legs[0].limit_price":"64000000000000","legs[0].size":"100000000","legs[1].limit_price":"3100250000000","legs[1].size":"2000000000"},"signature_accepted":true}},{"name":"order_with_builder_fee","description":"builder set, so the server verifies OrderWithBuilderFee. builder_fee is scaled with 4 decimals.","rpc":"order.create_order","inputs":{"wire_request":{"order":{"sub_account_id":"8289849667772468","is_market":false,"time_in_force":"GOOD_TILL_TIME","post_only":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.01","limit_price":"65000","is_buying_asset":true}],"builder":"0x2222222222222222222222222222222222222222","builder_fee":"0.001","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":1004,"chain_id":"326"},"metadata":{"client_order_id":"1004"}}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"OrderWithBuilderFee","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"OrderLeg":[{"name":"assetID","type":"uint256"},{"name":"contractSize","type":"uint64"},{"name":"limitPrice","type":"uint64"},{"name":"isBuyingContract","type":"bool"}],"OrderWithBuilderFee":[{"name":"subAccountID","type":"uint64"},{"name":"isMarket","type":"bool"},{"name":"timeInForce","type":"uint8"},{"name":"postOnly","type":"bool"},{"name":"reduceOnly","type":"bool"},{"name":"legs","type":"OrderLeg[]"},{"name":"builder","type":"address"},{"name":"builderFee","type":"uint32"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"OrderWithBuilderFee","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"builder":"0x2222222222222222222222222222222222222222","builderFee":"10","expiration":"4102444800000000000","isMarket":false,"legs":[{"assetID":"197889","contractSize":"10000000","isBuyingContract":true,"limitPrice":"65000000000000"}],"nonce":"1004","postOnly":false,"reduceOnly":false,"subAccountID":"8289849667772468","timeInForce":"1"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x608b60aedceb1c532e3ca68abcb636307537e67aaab0201ecea0f902e9b36db0","digest":"0x09b6c3c367b5641f38ab3750d2f5dc45325f3e46c15a3b6fe03e92b3ca7942af","r":"0x70f05845864275130f34abf4b26e66cffa71e88d95da7ae75626f438f5186519","s":"0x22b618fe6a11040535458c9b7aeac8a3be46f99b1f618a91749d34dad9c1b501","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1004,"r":"0x70f05845864275130f34abf4b26e66cffa71e88d95da7ae75626f438f5186519","s":"0x22b618fe6a11040535458c9b7aeac8a3be46f99b1f618a91749d34dad9c1b501","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"order":{"builder":"0x2222222222222222222222222222222222222222","builder_fee":"0.001","is_market":false,"legs":[{"instrument":"BTC_USDT_Perp","is_buying_asset":true,"limit_price":"65000","size":"0.01"}],"metadata":{"client_order_id":"1004"},"post_only":false,"reduce_only":false,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1004,"r":"0x70f05845864275130f34abf4b26e66cffa71e88d95da7ae75626f438f5186519","s":"0x22b618fe6a11040535458c9b7aeac8a3be46f99b1f618a91749d34dad9c1b501","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME"}}},"server":{"type":"OrderWithBuilderFee","digest":"0x09b6c3c367b5641f38ab3750d2f5dc45325f3e46c15a3b6fe03e92b3ca7942af","scaled":{"builder_fee":"10","legs[0].limit_price":"65000000000000","legs[0].size":"10000000"},"signature_accepted":true}},{"name":"order_max_precision","description":"size uses all 9 base decimals of BTC and limit_price all 9 price decimals.","rpc":"order.create_order","inputs":{"wire_request":{"order":{"sub_account_id":"8289849667772468","is_market":false,"time_in_force":"GOOD_TILL_TIME","post_only":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1.123456789","limit_price":"65000.123456789","is_buying_asset":false}],"signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":1005,"chain_id":"326"},"metadata":{"client_order_id":"1005"}}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"Order","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Order":[{"name":"subAccountID","type":"uint64"},{"name":"isMarket","type":"bool"},{"name":"timeInForce","type":"uint8"},{"name":"postOnly","type":"bool"},{"name":"reduceOnly","type":"bool"},{"name":"legs","type":"OrderLeg[]"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}],"OrderLeg":[{"name":"assetID","type":"uint256"},{"name":"contractSize","type":"uint64"},{"name":"limitPrice","type":"uint64"},{"name":"isBuyingContract","type":"bool"}]},"primaryType":"Order","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","isMarket":false,"legs":[{"assetID":"197889","contractSize":"1123456789","isBuyingContract":false,"limitPrice":"65000123456789"}],"nonce":"1005","postOnly":false,"reduceOnly":false,"subAccountID":"8289849667772468","timeInForce":"1"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0xc2bfc58b7fabc5b0526cbd4d9af753abc4af63e7aed21b186870938fbfd64210","digest":"0x2cb9842d6774c5a0a8bb183670b06f7fec2ce1376071f6f3d3128f303dc151c4","r":"0x1fbcdf00743ef8dd822e9d5481b6f1dad37d2e597877def095ca3cafbfc4757d","s":"0x203e815e06bd728903a4dd7db0dae4e55aac61a6dd87ce4f755cbaf7034c5a95","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1005,"r":"0x1fbcdf00743ef8dd822e9d5481b6f1dad37d2e597877def095ca3cafbfc4757d","s":"0x203e815e06bd728903a4dd7db0dae4e55aac61a6dd87ce4f755cbaf7034c5a95","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"order":{"is_market":false,"legs":[{"instrument":"BTC_USDT_Perp","is_buying_asset":false,"limit_price":"65000.123456789","size":"1.123456789"}],"metadata":{"client_order_id":"1005"},"post_only":false,"reduce_only":false,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":1005,"r":"0x1fbcdf00743ef8dd822e9d5481b6f1dad37d2e597877def095ca3cafbfc4757d","s":"0x203e815e06bd728903a4dd7db0dae4e55aac61a6dd87ce4f755cbaf7034c5a95","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME"}}},"server":{"type":"Order","digest":"0x2cb9842d6774c5a0a8bb183670b06f7fec2ce1376071f6f3d3128f303dc151c4","scaled":{"legs[0].limit_price":"65000123456789","legs[0].size":"1123456789"},"signature_accepted":true}},{"name":"order_over_precision","description":"size and limit_price have 10 fractional digits, one more than allowed. The SDK must refuse to sign.","rpc":"order.create_order","inputs":{"wire_request":{"order":{"sub_account_id":"8289849667772468","is_market":false,"time_in_force":"GOOD_TILL_TIME","post_only":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1.1234567891","limit_price":"65000.1234567891","is_buying_asset":false}],"signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":1006,"chain_id":"326"},"metadata":{"client_order_id":"1006"}}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"reject","rejection":{"error":"Order.legs (order.legs): OrderLeg.contractSize (size=1.1234567891): over precision: \"1.1234567891\" has 10 fractional digits, max 9"},"server":{"type":"Order","digest":"0xee016b69db24df5835b2dae943d1b255b7e9cfd7e47ad84346aaec34a2b04703","scaled":{"legs[0].limit_price":"65000123456789","legs[0].size":"1123456789"},"note":"server.scaled shows what the server's wire->DTO conversion produces today for these strings; the server does not reject."}},{"name":"bulk_orders","description":"Two orders in one bulk call, each signed on its own with its own nonce: a plain Order and an OrderWithBuilderFee, both on BTC_USDT_Perp (the server requires one asset per bulk call). The cancel list and time_to_live_ms are not signed.","rpc":"order.bulk_orders","inputs":{"wire_request":{"sub_account_id":"8289849667772468","orders":[{"sub_account_id":"8289849667772468","is_market":false,"time_in_force":"GOOD_TILL_TIME","post_only":true,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.5","limit_price":"64000","is_buying_asset":true}],"signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":5001,"chain_id":"326"},"metadata":{"client_order_id":"5001"}},{"sub_account_id":"8289849667772468","is_market":false,"time_in_force":"GOOD_TILL_TIME","post_only":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.25","limit_price":"66000.5","is_buying_asset":false}],"builder":"0x2222222222222222222222222222222222222222","builder_fee":"0.0005","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":5002,"chain_id":"326"},"metadata":{"client_order_id":"5002"}}],"client_order_i_ds":["4001"],"time_to_live_ms":"1000"},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","elements":[{"path":"orders[0]","signed_type":"Order","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Order":[{"name":"subAccountID","type":"uint64"},{"name":"isMarket","type":"bool"},{"name":"timeInForce","type":"uint8"},{"name":"postOnly","type":"bool"},{"name":"reduceOnly","type":"bool"},{"name":"legs","type":"OrderLeg[]"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}],"OrderLeg":[{"name":"assetID","type":"uint256"},{"name":"contractSize","type":"uint64"},{"name":"limitPrice","type":"uint64"},{"name":"isBuyingContract","type":"bool"}]},"primaryType":"Order","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","isMarket":false,"legs":[{"assetID":"197889","contractSize":"500000000","isBuyingContract":true,"limitPrice":"64000000000000"}],"nonce":"5001","postOnly":true,"reduceOnly":false,"subAccountID":"8289849667772468","timeInForce":"1"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0xbcc082006f485fd982f93af79ac5022e32f071d221e8c9d35fbf4e8e34d451be","digest":"0x25418b3c70ba5f56b8756c1fad4d58be1bc1e09f2f57d7c97170b5320a6b9c06","r":"0x7f50b9e9d602c8040e5502f8196ae574847218d66a96ded61af1c9dfa351ab6a","s":"0x61a4c4232e618980d834baf654ddebcf50158285db01454b7b4ede4cbb793e31","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":5001,"r":"0x7f50b9e9d602c8040e5502f8196ae574847218d66a96ded61af1c9dfa351ab6a","s":"0x61a4c4232e618980d834baf654ddebcf50158285db01454b7b4ede4cbb793e31","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28}},"server":{"type":"Order","digest":"0x25418b3c70ba5f56b8756c1fad4d58be1bc1e09f2f57d7c97170b5320a6b9c06","scaled":{"legs[0].limit_price":"64000000000000","legs[0].size":"500000000"},"signature_accepted":true}},{"path":"orders[1]","signed_type":"OrderWithBuilderFee","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"OrderLeg":[{"name":"assetID","type":"uint256"},{"name":"contractSize","type":"uint64"},{"name":"limitPrice","type":"uint64"},{"name":"isBuyingContract","type":"bool"}],"OrderWithBuilderFee":[{"name":"subAccountID","type":"uint64"},{"name":"isMarket","type":"bool"},{"name":"timeInForce","type":"uint8"},{"name":"postOnly","type":"bool"},{"name":"reduceOnly","type":"bool"},{"name":"legs","type":"OrderLeg[]"},{"name":"builder","type":"address"},{"name":"builderFee","type":"uint32"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"OrderWithBuilderFee","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"builder":"0x2222222222222222222222222222222222222222","builderFee":"5","expiration":"4102444800000000000","isMarket":false,"legs":[{"assetID":"197889","contractSize":"250000000","isBuyingContract":false,"limitPrice":"66000500000000"}],"nonce":"5002","postOnly":false,"reduceOnly":false,"subAccountID":"8289849667772468","timeInForce":"1"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x98bb65afda7b6db6d221ea9c7e3c4a362e386c6613ee51039493d7b680f1079c","digest":"0xd37d1ca9d12be0de22990d2a0e74fce73e6c4fb47b2a262b259208acc9dd6481","r":"0x088634c19819a8d169e7f5f23c917f7174b0817805da899288eac4eb04256eaa","s":"0x09194903f97803ad2f199157b4561836526c57321521858133c51f6e27a769b2","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":5002,"r":"0x088634c19819a8d169e7f5f23c917f7174b0817805da899288eac4eb04256eaa","s":"0x09194903f97803ad2f199157b4561836526c57321521858133c51f6e27a769b2","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27}},"server":{"type":"OrderWithBuilderFee","digest":"0xd37d1ca9d12be0de22990d2a0e74fce73e6c4fb47b2a262b259208acc9dd6481","scaled":{"builder_fee":"5","legs[0].limit_price":"66000500000000","legs[0].size":"250000000"},"signature_accepted":true}}],"signed_request":{"client_order_i_ds":["4001"],"orders":[{"is_market":false,"legs":[{"instrument":"BTC_USDT_Perp","is_buying_asset":true,"limit_price":"64000","size":"0.5"}],"metadata":{"client_order_id":"5001"},"post_only":true,"reduce_only":false,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":5001,"r":"0x7f50b9e9d602c8040e5502f8196ae574847218d66a96ded61af1c9dfa351ab6a","s":"0x61a4c4232e618980d834baf654ddebcf50158285db01454b7b4ede4cbb793e31","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME"},{"builder":"0x2222222222222222222222222222222222222222","builder_fee":"0.0005","is_market":false,"legs":[{"instrument":"BTC_USDT_Perp","is_buying_asset":false,"limit_price":"66000.5","size":"0.25"}],"metadata":{"client_order_id":"5002"},"post_only":false,"reduce_only":false,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":5002,"r":"0x088634c19819a8d169e7f5f23c917f7174b0817805da899288eac4eb04256eaa","s":"0x09194903f97803ad2f199157b4561836526c57321521858133c51f6e27a769b2","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME"}],"sub_account_id":"8289849667772468","time_to_live_ms":"1000"}},{"name":"transfer","description":"Main account to sub account, no wallet types, so the Transfer type.","rpc":"transfer.transfer","inputs":{"wire_request":{"from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","from_sub_account_id":"0","to_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","to_sub_account_id":"8289849667772468","currency":"USDT","num_tokens":"1500.25","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":2001,"chain_id":"326"},"transfer_type":"STANDARD"},"metadata":{"currencies":[{"id":3,"symbol":"USDT","balance_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"Transfer","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Transfer":[{"name":"fromAccount","type":"address"},{"name":"fromSubAccount","type":"uint64"},{"name":"toAccount","type":"address"},{"name":"toSubAccount","type":"uint64"},{"name":"tokenCurrency","type":"uint8"},{"name":"numTokens","type":"uint64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"Transfer","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","fromAccount":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","fromSubAccount":"0","nonce":"2001","numTokens":"1500250000","toAccount":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","toSubAccount":"8289849667772468","tokenCurrency":"3"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0xbaa2857e623bf265218ca9210003bab56c9486bd9f75da9b0cd3cb566b3b1917","digest":"0xf17ba792652522b4285c6c96b89d4aeb3eeffc817f7037cb89fa4f2a655a7781","r":"0x0239d69eb4aabc7b7135313ff34cc5c9c6ce6e68a343189181f60cb6b9fc4ff9","s":"0x05f2516e72cb9531762f5cf4c7dd6de8fbbc835c56a75e79148983904c1c5590","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":2001,"r":"0x0239d69eb4aabc7b7135313ff34cc5c9c6ce6e68a343189181f60cb6b9fc4ff9","s":"0x05f2516e72cb9531762f5cf4c7dd6de8fbbc835c56a75e79148983904c1c5590","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"currency":"USDT","from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","from_sub_account_id":"0","num_tokens":"1500.25","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":2001,"r":"0x0239d69eb4aabc7b7135313ff34cc5c9c6ce6e68a343189181f60cb6b9fc4ff9","s":"0x05f2516e72cb9531762f5cf4c7dd6de8fbbc835c56a75e79148983904c1c5590","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"to_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","to_sub_account_id":"8289849667772468","transfer_type":"STANDARD"}},"server":{"type":"Transfer","digest":"0xf17ba792652522b4285c6c96b89d4aeb3eeffc817f7037cb89fa4f2a655a7781","scaled":{"num_tokens":"1500250000"},"signature_accepted":true}},{"name":"transfer_wallet_types","description":"Both wallet types set and currency id <= 255, so TransferV2.","rpc":"transfer.transfer","inputs":{"wire_request":{"from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","from_sub_account_id":"0","to_account_id":"0x1111111111111111111111111111111111111111","to_sub_account_id":"0","currency":"USDT","num_tokens":"10","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":2002,"chain_id":"326"},"transfer_type":"STANDARD","from_wallet_type":"FUNDING","to_wallet_type":"SPOT"},"metadata":{"currencies":[{"id":3,"symbol":"USDT","balance_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"TransferV2","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"TransferV2":[{"name":"fromAccount","type":"address"},{"name":"fromSubAccount","type":"uint64"},{"name":"toAccount","type":"address"},{"name":"toSubAccount","type":"uint64"},{"name":"tokenCurrency","type":"uint8"},{"name":"numTokens","type":"uint64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"},{"name":"fromWalletType","type":"uint8"},{"name":"toWalletType","type":"uint8"}]},"primaryType":"TransferV2","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","fromAccount":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","fromSubAccount":"0","fromWalletType":"1","nonce":"2002","numTokens":"10000000","toAccount":"0x1111111111111111111111111111111111111111","toSubAccount":"0","toWalletType":"2","tokenCurrency":"3"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x5f3cf8a179ec29dfc68fd77b1637e6b58b531b0778cd04c3f4b02734ae1b8efc","digest":"0x9f0d9ae5e2b6aea384d9357b72f0acbcc96547780b73e62cffcbee6692b1a44d","r":"0x95575625b091e37ed217cc89c1f64336df6c0a0120bad88f73ff72038f71e70b","s":"0x06bc5a618e9d35d0373bb49def18ffaa1e23085629a05e0e278d1b32867adf34","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":2002,"r":"0x95575625b091e37ed217cc89c1f64336df6c0a0120bad88f73ff72038f71e70b","s":"0x06bc5a618e9d35d0373bb49def18ffaa1e23085629a05e0e278d1b32867adf34","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"currency":"USDT","from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","from_sub_account_id":"0","from_wallet_type":"FUNDING","num_tokens":"10","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":2002,"r":"0x95575625b091e37ed217cc89c1f64336df6c0a0120bad88f73ff72038f71e70b","s":"0x06bc5a618e9d35d0373bb49def18ffaa1e23085629a05e0e278d1b32867adf34","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"to_account_id":"0x1111111111111111111111111111111111111111","to_sub_account_id":"0","to_wallet_type":"SPOT","transfer_type":"STANDARD"}},"server":{"type":"TransferV2","digest":"0x9f0d9ae5e2b6aea384d9357b72f0acbcc96547780b73e62cffcbee6692b1a44d","scaled":{"num_tokens":"10000000"},"signature_accepted":true}},{"name":"transfer_wide_currency","description":"Currency id 300 (> 255, test-only currency) with wallet types, so TransferV3.","rpc":"transfer.transfer","inputs":{"wire_request":{"from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","from_sub_account_id":"0","to_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","to_sub_account_id":"8289849667772468","currency":"WIDETEST","num_tokens":"7.5","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":2003,"chain_id":"326"},"transfer_type":"STANDARD","from_wallet_type":"FUNDING","to_wallet_type":"FUTURES"},"metadata":{"currencies":[{"id":300,"symbol":"WIDETEST","balance_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"TransferV3","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"TransferV3":[{"name":"fromAccount","type":"address"},{"name":"fromSubAccount","type":"uint64"},{"name":"toAccount","type":"address"},{"name":"toSubAccount","type":"uint64"},{"name":"tokenCurrency","type":"uint16"},{"name":"numTokens","type":"uint64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"},{"name":"fromWalletType","type":"uint8"},{"name":"toWalletType","type":"uint8"}]},"primaryType":"TransferV3","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","fromAccount":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","fromSubAccount":"0","fromWalletType":"1","nonce":"2003","numTokens":"7500000","toAccount":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","toSubAccount":"8289849667772468","toWalletType":"3","tokenCurrency":"300"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0xe0861f2346eb7f064c3fe385924c1ba1d9c6cf7bb45e292a3985df9094d268f3","digest":"0xe3840019d1d63515d0900b95f816efee8aa6054d582e9caf5a723305748fbc44","r":"0x8c4f699077f21b8929d582b32f71e05b002387d5edf20c7aa2cbd9f9ec46b120","s":"0x0477eab34bafb160599b1cbecb2ec9e32fdda896de6ff4a792a6bad4c27a7dd1","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":2003,"r":"0x8c4f699077f21b8929d582b32f71e05b002387d5edf20c7aa2cbd9f9ec46b120","s":"0x0477eab34bafb160599b1cbecb2ec9e32fdda896de6ff4a792a6bad4c27a7dd1","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"currency":"WIDETEST","from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","from_sub_account_id":"0","from_wallet_type":"FUNDING","num_tokens":"7.5","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":2003,"r":"0x8c4f699077f21b8929d582b32f71e05b002387d5edf20c7aa2cbd9f9ec46b120","s":"0x0477eab34bafb160599b1cbecb2ec9e32fdda896de6ff4a792a6bad4c27a7dd1","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"to_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","to_sub_account_id":"8289849667772468","to_wallet_type":"FUTURES","transfer_type":"STANDARD"}},"server":{"type":"TransferV3","digest":"0xe3840019d1d63515d0900b95f816efee8aa6054d582e9caf5a723305748fbc44","scaled":{"num_tokens":"7500000"},"signature_accepted":true}},{"name":"withdrawal","description":"Withdraw USDT to an L1 address, Withdrawal type.","rpc":"transfer.withdrawal","inputs":{"wire_request":{"from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","to_eth_address":"0x1111111111111111111111111111111111111111","currency":"USDT","num_tokens":"250.5","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":3001,"chain_id":"326"}},"metadata":{"currencies":[{"id":3,"symbol":"USDT","balance_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"Withdrawal","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"Withdrawal":[{"name":"fromAccount","type":"address"},{"name":"toEthAddress","type":"address"},{"name":"tokenCurrency","type":"uint8"},{"name":"numTokens","type":"uint64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"Withdrawal","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","fromAccount":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","nonce":"3001","numTokens":"250500000","toEthAddress":"0x1111111111111111111111111111111111111111","tokenCurrency":"3"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x6d94ad37885deb8dc752412985fc290dd5280eb7e72ed1467a58e8e6eaa21b39","digest":"0xa7e3ab08c20d4574f000a953000123ca0611217504d478db4d85b4bf8ac986c4","r":"0xc5ac8c71098de5015667d228e222ccec468f4d7f437686440a3b0551757c51ea","s":"0x606969302f89ceae0819b04986e68cdb12c025aeca809b7f434691f54d1148c2","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":3001,"r":"0xc5ac8c71098de5015667d228e222ccec468f4d7f437686440a3b0551757c51ea","s":"0x606969302f89ceae0819b04986e68cdb12c025aeca809b7f434691f54d1148c2","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"currency":"USDT","from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","num_tokens":"250.5","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":3001,"r":"0xc5ac8c71098de5015667d228e222ccec468f4d7f437686440a3b0551757c51ea","s":"0x606969302f89ceae0819b04986e68cdb12c025aeca809b7f434691f54d1148c2","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"to_eth_address":"0x1111111111111111111111111111111111111111"}},"server":{"type":"Withdrawal","digest":"0xa7e3ab08c20d4574f000a953000123ca0611217504d478db4d85b4bf8ac986c4","scaled":{"num_tokens":"250500000"},"signature_accepted":true}},{"name":"withdrawal_wide_currency","description":"Currency id 300 (> 255, test-only currency), so WithdrawalV2.","rpc":"transfer.withdrawal","inputs":{"wire_request":{"from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","to_eth_address":"0x1111111111111111111111111111111111111111","currency":"WIDETEST","num_tokens":"1","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":3002,"chain_id":"326"}},"metadata":{"currencies":[{"id":300,"symbol":"WIDETEST","balance_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"WithdrawalV2","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"WithdrawalV2":[{"name":"fromAccount","type":"address"},{"name":"toEthAddress","type":"address"},{"name":"tokenCurrency","type":"uint16"},{"name":"numTokens","type":"uint64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"WithdrawalV2","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","fromAccount":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","nonce":"3002","numTokens":"1000000","toEthAddress":"0x1111111111111111111111111111111111111111","tokenCurrency":"300"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x7b8b0cb5c0f39436cb16a14a95ca9a3b638e192f7d144ee7f059b5848c1bec9b","digest":"0x007f18ccb50939a8203edb873f95172d15e006acbe878c9d2673198a9ab08905","r":"0xa9b7fc2942637f7d5cb21e3f7b55cf010dad01d5ed552ad28a5d5acb012ba9e1","s":"0x4efc1adfaff9453874a49afb916fb34574f36be850d08334086720f109d2020c","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":3002,"r":"0xa9b7fc2942637f7d5cb21e3f7b55cf010dad01d5ed552ad28a5d5acb012ba9e1","s":"0x4efc1adfaff9453874a49afb916fb34574f36be850d08334086720f109d2020c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"currency":"WIDETEST","from_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d","num_tokens":"1","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":3002,"r":"0xa9b7fc2942637f7d5cb21e3f7b55cf010dad01d5ed552ad28a5d5acb012ba9e1","s":"0x4efc1adfaff9453874a49afb916fb34574f36be850d08334086720f109d2020c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"to_eth_address":"0x1111111111111111111111111111111111111111"}},"server":{"type":"WithdrawalV2","digest":"0x007f18ccb50939a8203edb873f95172d15e006acbe878c9d2673198a9ab08905","scaled":{"num_tokens":"1000000"},"signature_accepted":true}},{"name":"wallet_login","description":"Edge wallet login. address must equal signature.signer.","rpc":"edge.wallet_login","inputs":{"wire_request":{"address":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":4001,"chain_id":"326"}},"metadata":{},"env_chain_id":326},"expect":"sign","signed_type":"WalletLogin","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"WalletLogin":[{"name":"signer","type":"address"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"WalletLogin","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"expiration":"4102444800000000000","nonce":"4001","signer":"0x1267C6181AEE40f5dDbd70c56eCf4613117326b5"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x3e694c47d7f277ddf634ba4f72dbd19c20cbfe4cb7e83dae1490d6e4b5adac46","digest":"0x1522126e0b0e4534911f1b6f21a6dedad8c88a49c6012937d6101fa155aa6e14","r":"0x9fe0e9a937fb9942301dd847d189440131d197099eb50a436f384dcff87163f0","s":"0x6171f0d991013f7d0f057bf105abe1180423267f6dc41e3b733d59ac8c71ec9b","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":4001,"r":"0x9fe0e9a937fb9942301dd847d189440131d197099eb50a436f384dcff87163f0","s":"0x6171f0d991013f7d0f057bf105abe1180423267f6dc41e3b733d59ac8c71ec9b","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"address":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":4001,"r":"0x9fe0e9a937fb9942301dd847d189440131d197099eb50a436f384dcff87163f0","s":"0x6171f0d991013f7d0f057bf105abe1180423267f6dc41e3b733d59ac8c71ec9b","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28}}},"server":{"type":"WalletLogin","digest":"0x1522126e0b0e4534911f1b6f21a6dedad8c88a49c6012937d6101fa155aa6e14","scaled":{},"signature_accepted":true}},{"name":"vault_invest","description":"Invest 1000.5 USDT from the funding account into a vault whose investment currency is USDC, at 0.9998 USDC per USDT. accountID is the session's main account (metadata main_account_id); from_num_tokens uses USDT's decimals and exchange_rate 9.","rpc":"vault.vault_invest","inputs":{"wire_request":{"vault_id":"4211543862","from_sub_account_id":"0","from_wallet_type":"FUNDING","from_currency":"USDT","from_num_tokens":"1000.5","to_currency":"USDC","exchange_rate":"0.9998","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":6001,"chain_id":"326"}},"metadata":{"currencies":[{"id":3,"symbol":"USDT","balance_decimals":6},{"id":2,"symbol":"USDC","balance_decimals":6}],"main_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d"},"env_chain_id":326},"expect":"sign","signed_type":"VaultInvestV3","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"VaultInvestV3":[{"name":"vaultID","type":"uint64"},{"name":"accountID","type":"address"},{"name":"fromSubAccountID","type":"uint64"},{"name":"fromWalletType","type":"uint8"},{"name":"fromCurrency","type":"uint16"},{"name":"fromNumTokens","type":"uint64"},{"name":"toCurrency","type":"uint16"},{"name":"exchangeRate","type":"uint64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"VaultInvestV3","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"accountID":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","exchangeRate":"999800000","expiration":"4102444800000000000","fromCurrency":"3","fromNumTokens":"1000500000","fromSubAccountID":"0","fromWalletType":"1","nonce":"6001","toCurrency":"2","vaultID":"4211543862"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x305b50e6128968c50e905e7c5b2c3f9e5e8648d2a5985097e114ca6883c50e06","digest":"0x5e28c5a2d5e01a4b43ef7200c727c0d9864bb5f252ebf484386d5b486f43ba44","r":"0xb6b4a3f4e7678087b448e147ac0b63f03f105c8cee6764276ea972484b57c095","s":"0x2ba7a7455cde97674db9bf20b091c9add3ab43d1113e551961f9cf23ab3fb12c","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":6001,"r":"0xb6b4a3f4e7678087b448e147ac0b63f03f105c8cee6764276ea972484b57c095","s":"0x2ba7a7455cde97674db9bf20b091c9add3ab43d1113e551961f9cf23ab3fb12c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"exchange_rate":"0.9998","from_currency":"USDT","from_num_tokens":"1000.5","from_sub_account_id":"0","from_wallet_type":"FUNDING","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":6001,"r":"0xb6b4a3f4e7678087b448e147ac0b63f03f105c8cee6764276ea972484b57c095","s":"0x2ba7a7455cde97674db9bf20b091c9add3ab43d1113e551961f9cf23ab3fb12c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"to_currency":"USDC","vault_id":"4211543862"}},"server":{"type":"VaultInvestV3","digest":"0x5e28c5a2d5e01a4b43ef7200c727c0d9864bb5f252ebf484386d5b486f43ba44","scaled":{"exchange_rate":"999800000","from_num_tokens":"1000500000"},"signature_accepted":true}},{"name":"vault_redeem","description":"Redeem 12.345678 shares (6 decimals) paid in USDT at 1.0001 USDT per USDC. accountID is the session's main account.","rpc":"vault.vault_redeem","inputs":{"wire_request":{"vault_id":"4211543862","from_currency":"USDC","to_currency":"USDT","num_tokens":"12.345678","exchange_rate":"1.0001","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":6002,"chain_id":"326"}},"metadata":{"currencies":[{"id":2,"symbol":"USDC","balance_decimals":6},{"id":3,"symbol":"USDT","balance_decimals":6}],"main_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d"},"env_chain_id":326},"expect":"sign","signed_type":"VaultRedeemV3","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"VaultRedeemV3":[{"name":"vaultID","type":"uint64"},{"name":"accountID","type":"address"},{"name":"numLpTokens","type":"uint64"},{"name":"fromCurrency","type":"uint16"},{"name":"toCurrency","type":"uint16"},{"name":"exchangeRate","type":"uint64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"VaultRedeemV3","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"accountID":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","exchangeRate":"1000100000","expiration":"4102444800000000000","fromCurrency":"2","nonce":"6002","numLpTokens":"12345678","toCurrency":"3","vaultID":"4211543862"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0xc4bbc13c827d7e1dbd9f68e471c5e77ab32f616b55bceeab2dffa8ca740f5351","digest":"0xa4b83096a74185b2cce4262757961859610ca0e54b18548e577014288144c9c2","r":"0xfbf8353f027b0254b71ae8d810155fbf420d58bf9433cc7b8017db67c0922443","s":"0x3037a815a52b7eee91e50adc300641e92ca938f97d3e46490d32a96ee14f15e5","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":6002,"r":"0xfbf8353f027b0254b71ae8d810155fbf420d58bf9433cc7b8017db67c0922443","s":"0x3037a815a52b7eee91e50adc300641e92ca938f97d3e46490d32a96ee14f15e5","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"exchange_rate":"1.0001","from_currency":"USDC","num_tokens":"12.345678","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":6002,"r":"0xfbf8353f027b0254b71ae8d810155fbf420d58bf9433cc7b8017db67c0922443","s":"0x3037a815a52b7eee91e50adc300641e92ca938f97d3e46490d32a96ee14f15e5","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"to_currency":"USDT","vault_id":"4211543862"}},"server":{"type":"VaultRedeemV3","digest":"0xa4b83096a74185b2cce4262757961859610ca0e54b18548e577014288144c9c2","scaled":{"exchange_rate":"1000100000","num_tokens":"12345678"},"signature_accepted":true}},{"name":"vault_burn_tokens","description":"A vault manager burns 100.5 shares (6 decimals). accountID is the session's main account; currency is not signed.","rpc":"vault.vault_burn_tokens","inputs":{"wire_request":{"vault_id":"4211543862","currency":"USDT","num_tokens":"100.5","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":6003,"chain_id":"326"}},"metadata":{"main_account_id":"0x0c3e7b0a6c8a1b2d3e4f5a6b7c8d9e0f1a2b3c4d"},"env_chain_id":326},"expect":"sign","signed_type":"VaultBurnLpToken","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"VaultBurnLpToken":[{"name":"vaultID","type":"uint64"},{"name":"numLpTokens","type":"uint64"},{"name":"accountID","type":"address"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"VaultBurnLpToken","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"accountID":"0x0C3e7B0a6C8A1B2d3e4F5A6B7c8D9E0f1a2b3C4d","expiration":"4102444800000000000","nonce":"6003","numLpTokens":"100500000","vaultID":"4211543862"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x71484c7d5e0095df4972a9e828f4288c433bb0c5c447fd254b4b302918377dfa","digest":"0x1dcd849d0fbe437101afc1f2e1976430a2d21dfc6253d55c34e7b28849359477","r":"0x9b8bc1060733bf419d9bdfc8b6293257b455122053baa11871f7b033a0ae7c5b","s":"0x7f1fc9a3369e628d8280a6d80a5d3d7547519c6f849b2babc2b71bb2f916f78b","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":6003,"r":"0x9b8bc1060733bf419d9bdfc8b6293257b455122053baa11871f7b033a0ae7c5b","s":"0x7f1fc9a3369e628d8280a6d80a5d3d7547519c6f849b2babc2b71bb2f916f78b","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"currency":"USDT","num_tokens":"100.5","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":6003,"r":"0x9b8bc1060733bf419d9bdfc8b6293257b455122053baa11871f7b033a0ae7c5b","s":"0x7f1fc9a3369e628d8280a6d80a5d3d7547519c6f849b2babc2b71bb2f916f78b","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"vault_id":"4211543862"}},"server":{"type":"VaultBurnLpToken","digest":"0x1dcd849d0fbe437101afc1f2e1976430a2d21dfc6253d55c34e7b28849359477","scaled":{"num_tokens":"100500000"},"signature_accepted":true}},{"name":"add_position_margin","description":"Add 250.5 USDT of isolated margin to the BTC_USDT_Perp position; amount uses the quote currency's decimals.","rpc":"position.add_position_margin","inputs":{"wire_request":{"sub_account_id":"8289849667772468","instrument":"BTC_USDT_Perp","amount":"250.5","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":7001,"chain_id":"326"}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"AddIsolatedPositionMargin","steps":{"typed_data":{"types":{"AddIsolatedPositionMargin":[{"name":"subAccountID","type":"uint64"},{"name":"asset","type":"uint256"},{"name":"amount","type":"int64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}],"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}]},"primaryType":"AddIsolatedPositionMargin","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"amount":"250500000","asset":"197889","expiration":"4102444800000000000","nonce":"7001","subAccountID":"8289849667772468"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x0e83bab13995938e5d2e86e9f916cbbacc249cc2b9bddb2b78acf994e31027eb","digest":"0xb777923ee34033655e0f98d30dc6b5c2813235be0173fd88561c7be0b2a14c50","r":"0xa6c5b70511e756de6aaf369108936d269b0e61c7673616aa00487aee57796999","s":"0x475a754620a071b66c392968e668cba6c5953408007805303b47749620c63b6c","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7001,"r":"0xa6c5b70511e756de6aaf369108936d269b0e61c7673616aa00487aee57796999","s":"0x475a754620a071b66c392968e668cba6c5953408007805303b47749620c63b6c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"amount":"250.5","instrument":"BTC_USDT_Perp","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7001,"r":"0xa6c5b70511e756de6aaf369108936d269b0e61c7673616aa00487aee57796999","s":"0x475a754620a071b66c392968e668cba6c5953408007805303b47749620c63b6c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"sub_account_id":"8289849667772468"}},"server":{"type":"AddIsolatedPositionMargin","digest":"0xb777923ee34033655e0f98d30dc6b5c2813235be0173fd88561c7be0b2a14c50","scaled":{"amount":"250500000"},"signature_accepted":true}},{"name":"remove_position_margin","description":"A negative amount removes margin: -100.25 is signed as the int64 -100250000.","rpc":"position.add_position_margin","inputs":{"wire_request":{"sub_account_id":"8289849667772468","instrument":"BTC_USDT_Perp","amount":"-100.25","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":7002,"chain_id":"326"}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"AddIsolatedPositionMargin","steps":{"typed_data":{"types":{"AddIsolatedPositionMargin":[{"name":"subAccountID","type":"uint64"},{"name":"asset","type":"uint256"},{"name":"amount","type":"int64"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}],"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}]},"primaryType":"AddIsolatedPositionMargin","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"amount":"-100250000","asset":"197889","expiration":"4102444800000000000","nonce":"7002","subAccountID":"8289849667772468"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0xcccced87f309dfb5519358cee9639ad38e41b3a76ace31674e140473c859cb7e","digest":"0x36780cb75505d0bfdafa27bd962f0436ba813f8f6705a1b53f870f2014225358","r":"0x79889776c2c0bb6f4e399316255835fe79f8d8a6c7d3ef57014356b97d55baf0","s":"0x4af451aa15a342860a6e97f64b9d404824c526155918f3bf436649ca8ec59c45","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7002,"r":"0x79889776c2c0bb6f4e399316255835fe79f8d8a6c7d3ef57014356b97d55baf0","s":"0x4af451aa15a342860a6e97f64b9d404824c526155918f3bf436649ca8ec59c45","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"amount":"-100.25","instrument":"BTC_USDT_Perp","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7002,"r":"0x79889776c2c0bb6f4e399316255835fe79f8d8a6c7d3ef57014356b97d55baf0","s":"0x4af451aa15a342860a6e97f64b9d404824c526155918f3bf436649ca8ec59c45","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468"}},"server":{"type":"AddIsolatedPositionMargin","digest":"0x36780cb75505d0bfdafa27bd962f0436ba813f8f6705a1b53f870f2014225358","scaled":{"amount":"-100250000"},"signature_accepted":true}},{"name":"set_position_config","description":"Isolated margin at 10x leverage on BTC_USDT_Perp; leverage has 6 decimals.","rpc":"position.set_position_config","inputs":{"wire_request":{"sub_account_id":"8289849667772468","instrument":"BTC_USDT_Perp","margin_type":"ISOLATED","leverage":"10","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":7003,"chain_id":"326"}},"metadata":{"instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base":"BTC","quote":"USDT","base_decimals":9,"quote_decimals":6}]},"env_chain_id":326},"expect":"sign","signed_type":"SetSubAccountPositionMarginConfig","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"SetSubAccountPositionMarginConfig":[{"name":"subAccountID","type":"uint64"},{"name":"asset","type":"uint256"},{"name":"marginType","type":"uint8"},{"name":"leverage","type":"int32"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"SetSubAccountPositionMarginConfig","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"asset":"197889","expiration":"4102444800000000000","leverage":"10000000","marginType":"1","nonce":"7003","subAccountID":"8289849667772468"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x81bbcaf3a0b32276c79ff5922c0d851241624f62f9f84f19821647f66df974cd","digest":"0x33634cb8359ac37c5c6d24e8763dfd3c97a26cde9351ea384bbf45f1c0394cb0","r":"0x0bb90e28853419909c56ddef5bffa602831db7cd768756c6017fb0d81f425284","s":"0x78c895387b2bc64e7206fa8257b0a796bf5adc46788ac61efb857718cc82dc5c","v":27,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7003,"r":"0x0bb90e28853419909c56ddef5bffa602831db7cd768756c6017fb0d81f425284","s":"0x78c895387b2bc64e7206fa8257b0a796bf5adc46788ac61efb857718cc82dc5c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"signed_request":{"instrument":"BTC_USDT_Perp","leverage":"10","margin_type":"ISOLATED","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7003,"r":"0x0bb90e28853419909c56ddef5bffa602831db7cd768756c6017fb0d81f425284","s":"0x78c895387b2bc64e7206fa8257b0a796bf5adc46788ac61efb857718cc82dc5c","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":27},"sub_account_id":"8289849667772468"}},"server":{"type":"SetSubAccountPositionMarginConfig","digest":"0x33634cb8359ac37c5c6d24e8763dfd3c97a26cde9351ea384bbf45f1c0394cb0","scaled":{"leverage":"10000000"},"signature_accepted":true}},{"name":"set_derisk_mm_ratio","description":"Derisk at 1.5x the maintenance margin; ratio has 6 decimals. Only risk checks this signature.","rpc":"derisk_mm_ratio.set_derisk_mm_ratio","inputs":{"wire_request":{"sub_account_id":"8289849667772468","ratio":"1.5","signature":{"signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","expiration":"4102444800000000000","nonce":7004,"chain_id":"326"}},"metadata":{},"env_chain_id":326},"expect":"sign","signed_type":"SetDeriskToMaintenanceMarginRatio","steps":{"typed_data":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"}],"SetDeriskToMaintenanceMarginRatio":[{"name":"subAccountID","type":"uint64"},{"name":"deriskToMaintenanceMarginRatio","type":"uint32"},{"name":"nonce","type":"uint32"},{"name":"expiration","type":"int64"}]},"primaryType":"SetDeriskToMaintenanceMarginRatio","domain":{"chainId":"326","name":"GRVT Exchange","version":"0"},"message":{"deriskToMaintenanceMarginRatio":"1500000","expiration":"4102444800000000000","nonce":"7004","subAccountID":"8289849667772468"}},"domain_separator":"0x1254f97f8495f704630a238cbcd898a4b8ab20d77bb93e17049d3445f4f81f16","struct_hash":"0x3449ed5b5254e4e0d60d8626f3c1c90d42622785bedc633c86453f8f5da9444b","digest":"0xcdf7cf83641d491b4bf66fe060fa7c308040762a7422ca26e7a78ada1c20c24b","r":"0x01185aa25dc9ea38db40317d1a6f4d1276a344cbb674a8d5a0968555ec00938f","s":"0x79ca18a6938cae199cf8a38005924cc6400f98c2264c419ff6619a6b2dde73fe","v":28,"signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7004,"r":"0x01185aa25dc9ea38db40317d1a6f4d1276a344cbb674a8d5a0968555ec00938f","s":"0x79ca18a6938cae199cf8a38005924cc6400f98c2264c419ff6619a6b2dde73fe","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"signed_request":{"ratio":"1.5","signature":{"chain_id":"326","expiration":"4102444800000000000","nonce":7004,"r":"0x01185aa25dc9ea38db40317d1a6f4d1276a344cbb674a8d5a0968555ec00938f","s":"0x79ca18a6938cae199cf8a38005924cc6400f98c2264c419ff6619a6b2dde73fe","signer":"0x1267c6181aee40f5ddbd70c56ecf4613117326b5","v":28},"sub_account_id":"8289849667772468"}},"server":{"type":"SetDeriskToMaintenanceMarginRatio","digest":"0xcdf7cf83641d491b4bf66fe060fa7c308040762a7422ca26e7a78ada1c20c24b","scaled":{"ratio":"1500000"},"signature_accepted":true}}],"order_checks":[{"name":"on_grid","description":"Price on the 0.1 tick, size a multiple of min_size, notional 600.001 >= 100.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.01","limit_price":"60000.1","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"pass","server":{"code":0,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"off_grid_price","description":"Price between two ticks: both neighbours are offered.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.01","limit_price":"60000.03","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"reject","rejection":{"instrument":"BTC_USDT_Perp","leg":0,"field":"limit_price","check":"multiple_of","limit":"tick_size","value":"60000.03","limit_value":"0.1","nearest":["60000","60000.1"],"server_code":2064,"message":"BTC_USDT_Perp: limit_price 60000.03 isn't a multiple of tick_size 0.1 (nearest: 60000 or 60000.1)"},"server":{"code":2064,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"off_grid_size","description":"Size between two multiples of min_size.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.0015","limit_price":"70000","is_buying_asset":false}],"metadata":{"client_order_id":"7"}},"expect":"reject","rejection":{"instrument":"BTC_USDT_Perp","leg":0,"field":"size","check":"multiple_of","limit":"min_size","value":"0.0015","limit_value":"0.001","nearest":["0.001","0.002"],"server_code":2065,"message":"BTC_USDT_Perp: size 0.0015 isn't a multiple of min_size 0.001 (nearest: 0.001 or 0.002)"},"server":{"code":2065,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"below_min_size","description":"Size under min_size; the minimum is checked before the price.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.0005","limit_price":"60000.03","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"reject","rejection":{"instrument":"BTC_USDT_Perp","leg":0,"field":"size","check":"at_least","limit":"min_size","value":"0.0005","limit_value":"0.001","nearest":["0.001"],"server_code":2062,"message":"BTC_USDT_Perp: size 0.0005 is below min_size 0.001"},"server":{"code":2062,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"below_min_notional","description":"0.001 x 60000 = 60 < 100: the smallest size at this price, on the size step, is offered.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.001","limit_price":"60000","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"reject","rejection":{"instrument":"BTC_USDT_Perp","leg":0,"field":"limit_price * size","check":"at_least","limit":"min_notional","value":"60","limit_value":"100","nearest":["0.002"],"server_code":2066,"message":"BTC_USDT_Perp: limit_price * size = 60 is below min_notional 100 (smallest size at this limit_price: 0.002)"},"server":{"code":2066,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"awkward_tick_on_grid","description":"Tick 0.5: 1234.5 is on it.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.5","min_size":"0.1","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1","limit_price":"1234.5","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"pass","server":{"code":0,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"awkward_tick_off_grid","description":"Tick 0.25: 1234.3 lies between 1234.25 and 1234.5.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.25","min_size":"0.1","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1","limit_price":"1234.3","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"reject","rejection":{"instrument":"BTC_USDT_Perp","leg":0,"field":"limit_price","check":"multiple_of","limit":"tick_size","value":"1234.3","limit_value":"0.25","nearest":["1234.25","1234.5"],"server_code":2064,"message":"BTC_USDT_Perp: limit_price 1234.3 isn't a multiple of tick_size 0.25 (nearest: 1234.25 or 1234.5)"},"server":{"code":2064,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"large_on_grid","description":"Price 18446744073.7: the largest 0.1 tick that fits uint64 at 9 decimals.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1","limit_price":"18446744073.7","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"pass","server":{"code":0,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"large_off_grid","description":"Price at the uint64 limit: the upper neighbour no longer fits uint64 and is still reported exactly.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1","limit_price":"18446744073.709551615","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"reject","rejection":{"instrument":"BTC_USDT_Perp","leg":0,"field":"limit_price","check":"multiple_of","limit":"tick_size","value":"18446744073.709551615","limit_value":"0.1","nearest":["18446744073.7","18446744073.8"],"server_code":2064,"message":"BTC_USDT_Perp: limit_price 18446744073.709551615 isn't a multiple of tick_size 0.1 (nearest: 18446744073.7 or 18446744073.8)"},"server":{"code":2064,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"too_large","description":"One unit above the uint64 limit at 9 decimals: a malformed value, not a limit failure.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1","limit_price":"18446744073.709551616","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"invalid"},{"name":"market_order_skipped","description":"A market order has no price: tick and notional are not checked (the gateway prices the notional at mark).","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":true,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.002","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"pass","server":{"code":0,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"reduce_only_dust_close","description":"Reduce-only sell of the whole 0.0005 position: size checks are skipped because the gateway waives them for an exact close.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":true,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.0005","limit_price":"60000","is_buying_asset":false}],"metadata":{"client_order_id":"7"}},"expect":"pass","server":{"code":0,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"close_position_tpsl_skipped","description":"A close-position take-profit under min_notional: the notional check is skipped (the gateway decides from the position).","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.001","limit_price":"60000","is_buying_asset":false}],"metadata":{"client_order_id":"7","trigger":{"trigger_type":"TAKE_PROFIT","tpsl":{"trigger_by":"LAST","trigger_price":"60000","close_position":true,"is_split_position":false}}}},"expect":"pass","server":{"code":0,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"multi_leg_second_fails","description":"Legs are checked in order; the second leg's price is off its own tick.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"},{"instrument":"ETH_USDT_Perp","instrument_hash":"0x030401","base_decimals":9,"tick_size":"0.01","min_size":"0.01","min_notional":"20"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.01","limit_price":"60000","is_buying_asset":true},{"instrument":"ETH_USDT_Perp","size":"1","limit_price":"3000.005","is_buying_asset":false}],"metadata":{"client_order_id":"7"}},"expect":"reject","rejection":{"instrument":"ETH_USDT_Perp","leg":1,"field":"limit_price","check":"multiple_of","limit":"tick_size","value":"3000.005","limit_value":"0.01","nearest":["3000","3000.01"],"server_code":2064,"message":"ETH_USDT_Perp: limit_price 3000.005 isn't a multiple of tick_size 0.01 (nearest: 3000 or 3000.01)"},"server":{"code":2064,"note":"stateful.ValidateCreateOrderPriceQty(grain=true, reduceOnlyMinNotional=false, triggerTick=false)"}},{"name":"malformed_size","description":"Not a decimal number.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"1.2.3","limit_price":"60000","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"invalid"},{"name":"over_precise_size","description":"More decimals than base_decimals (9): refused, never rounded.","instruments":[{"instrument":"BTC_USDT_Perp","instrument_hash":"0x030501","base_decimals":9,"tick_size":"0.1","min_size":"0.001","min_notional":"100"}],"order":{"sub_account_id":"8289849667772468","time_in_force":"GOOD_TILL_TIME","is_market":false,"reduce_only":false,"legs":[{"instrument":"BTC_USDT_Perp","size":"0.0010000001","limit_price":"60000","is_buying_asset":true}],"metadata":{"client_order_id":"7"}},"expect":"invalid"}]}