Collateral Approval
Approve collateral for trading. The `amt` field can be either a number or a string `max`. Setting the approval to max will ensure no approvals are needed prior to a trade. This may also save gas costs and reduce code complexity. Alternatively, it is possible to approve only the amount intended to be traded (plus trading fees if applicable) for each order quoted or filled.
post
Authorizations
Body
tokenstringRequiredExample:
WETH
amtone ofRequiredExample:
max
numberOptional
stringOptionalPattern:
^max$
Responses
200
Approved
application/json
400
Invalid parameters supplied
application/json
401
Not authorized
application/json
post
POST /account/collateral_approval HTTP/1.1
Host:
x-apikey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 30
[
{
"token": "WETH",
"amt": "max"
}
]
{
"success": [
{
"token": "WETH",
"amt": "max"
}
],
"failed": [
{
"failedApproval": {
"token": "WETH",
"amt": "max"
},
"reason": "text"
}
]
}
Last updated
Was this helpful?