POST
/
api
/
v1
/
token
/
withdrawCollateral
curl --request POST \
  --url https://mainnetapiserverwriter.logx.network/api/v1/token/withdrawCollateral \
  --header 'Content-Type: application/json' \
  --data '{
  "subAccountId": "1_0x4012AB6a68CD1B2Eb2d0B1DdcE846DBe5d0B4059_1",
  "sessionKey": "0x040807530737h7E8D14Aa6c1dD18044bcAA97A62",
  "productId": 10,
  "amount": "1000000000000000000",
  "nonce": 28,
  "destinationChainId": 421614,
  "receiver": "0x1020AB6a68CD1B2Eb890B1DdcE846DBe5d0B4059",
  "chainId": 9369
}'
{
  "success": true
}

Body

application/json
The request object for withdrawing collateral.
subAccountId
string

The subaccount ID associated with your address.

Example:

"1_0x4012AB6a68CD1B2Eb2d0B1DdcE846DBe5d0B4059_1"

sessionKey
string

The public key generated during account registration.

Example:

"0x040807530737h7E8D14Aa6c1dD18044bcAA97A62"

productId
integer

The product ID of the token to be withdrawn.

Example:

10

amount
string

The amount of the token to be withdrawn, scaled to 18 decimal places.

Example:

"1000000000000000000"

nonce
integer

The nonce of the subaccount. This can be fetched using the Nonce API.

Example:

28

destinationChainId
integer

The ID of the destination chain for the withdrawal.

Example:

421614

receiver
string

The Ethereum address of the recipient.

Example:

"0x1020AB6a68CD1B2Eb890B1DdcE846DBe5d0B4059"

chainId
integer

The chain ID from which the withdrawal is initiated.

Example:

9369

Response

200 - application/json
The token balance was withdrawn successfully.
success
boolean

Indicates whether the withdrawal operation was successful.

Example:

true