Withdraw

Withdraw USDC

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Signature verification

The api expects a EIP712 signature constructed with the following typed data:

{
  EIP712Domain: [
    {
      name: 'name', // ciao
      type: 'string',
    },
    {
      name: 'version', // "0.0.0"
      type: 'string',
    },
    {
      name: 'chainId', 
      type: 'uint256',
    },
    {
      name: 'verifyingContract', 
      type: 'address',
    },
  ],
  Withdraw: [
		{
			name: "account", // address of the account withdrawing
			type: "address",
		},
		{
			name: "subAccountId", // subAccountId of the subaccount to withdraw from
			type: "uint8",
		},
		{
			name: "asset", // address of the asset in the margin account to withdraw
			type: "address",
		},
		{
			name: "quantity", // quantity to withdraw in e18 format
			type: "uint128",
		},
		{
			name: "nonce", // unique nonce for the transaction, nonces are tracked globally across all actions and cannot be repeated
			type: "uint64",
		},
	],
}

Example request:

{
  "account": "0x1234",                                    // Account address
  "subAccountId": 0,                                      // Subaccount id
  "asset": "0x4300000000000000000000000000000000000003",  // Address of the asset to withdraw (USDB)
  "quantity": "10000000000000000",                        // Quantity of the order in e18 decimals
  "nonce": 1718718131305466,                              // Unique nonce for the transaction, nonces are tracked globally across all actions and cannot be repeated 
  "signature": "0x1234..."                                // Signature for verifying the order
}

Example response:

{
  "success":true,
  "error": null
}
Body Params
string
required

address of the account withdrawing

int32
required

subAccountId of the subaccount to withdraw from

string
required

address of the asset

string
required

quantity to withdraw in e18 decimals

int32
required

unique integer not used anywhere else less than uint64

string
required

signature generated from signing a EIP712 Withdraw

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json