Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Buy

Buy cryptocurrency.

Endpoint: POST /trade/buy

Authentication: Required (x-api-key header)

Authentication: Required (x-api-key for live, x-staging-api-key for test)

Fees

Fees are taken from the token you use for the trade (USDT).

Request Parameters

Parameter
Type
Required
Description

amount

number

Yes

Amount of token you want to buy (must be greater than 0)

token

string

Yes

Token to buy (e.g., btc, eth)

Example Request

curl -X POST https://service.roqqu.com/v1/trade/buy \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "amount=0.00002" \
  -d "token=btc"

Example Response

{
  "status": "success",
  "message": "buy operation successful",
  "data": null
}

Buy is a ledger operation. It does not emit a webhook. Confirm via balances / history.

Error Response

Invalid token:

Buys not enabled:

Insufficient USDT (source for buy):

Fee too high (fee ≥ source amount):

Below minimum:

Above maximum:

Amount must be positive:

Unable to load token data:

Last updated