Trade tokens on an exchange
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Trade tokens on a decentralized exchange. This operation exchanges one token for another.
Body
Request value.
owner_addressstringrequiredThe owner address that trades tokens, in hex string format
exchange_idintegerrequiredThe id of the exchange
token_idstringrequiredThe id of the token sold, if it's TRX, should be "_"
quantintegerrequiredThe amount of tokens to sell
expectedintegerrequiredThe expected amount of tokens to buy (minimum acceptable amount)
visiblebooleanWhether the address is in base58 format
Response
HTTP 200 response for exchangetransaction. The body contains either a successful result or a node-level error.
Bad Request. The request is malformed or contains invalid parameters.
Unauthorized: API key is present but rejected by the NOWNodes gateway.
Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.
Missing API key. The NOWNodes gateway returns plain text for this error.
Internal Server Error. The gateway or node failed while processing the request.