POST
/
api
/
orders
/
{id}
/
cancel
curl --request POST \
  --url https://app.sandbox.rio.trade/api/orders/{id}/cancel \
  --header 'x-api-key: <api-key>'
{
  "quoteId": "6660bdefd6c964829d63fcb7",
  "userId": "65a99abb6a92bda6e52bf7af",
  "status": "created",
  "crypto": "USDC",
  "side": "buy",
  "fiat": "USD",
  "createdAt": "2024-06-05T19:35:17.436Z",
  "cryptoAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
  "country": "MX",
  "amountFiat": 1000,
  "amountCrypto": 55.51,
  "fees": {
    "processingFeeFiat": 0,
    "transferFeeFiat": 0.17594406538826532,
    "brokerFeeFiat": 0,
    "brokerFeeFiatTax": 0,
    "platformFeeFiat": 20,
    "platformFeeFiatTax": 3.2
  },
  "price": 0.0568362449619,
  "notes": "Description",
  "expiredQuotes": [
    "<string>"
  ],
  "id": "6660bdf5cc4633bc64122f3c"
}

Requirements to consume the endpoint.

Create and modify role

The user must have the role to create and modify.

User approved

The user must be approved in at least one country.

Authorizations

x-api-key
string
header
required

Path Parameters

id
string
required

Id of the order to be cancelled.

Response

200
application/json
OK
quoteId
string

The unique identifier assigned to the quote.

Example:

"6660bdefd6c964829d63fcb7"

userId
string

The unique identifier assigned to the user.

Example:

"65a99abb6a92bda6e52bf7af"

status
enum<string>

The current status of the order.

Available options:
created,
cancelled,
processing,
sourcingLiquidity,
cryptoAddressAdded,
liquiditySourced,
awaitingBankPayoutDetails,
awaitingBinanceSettlement,
binanceSettlementFailed,
incorrectBinanceSettlement,
depositRegistered,
depositConfirmed,
paymentOriginMismatch,
paid,
filled,
refundInitiated,
addressCheckPassed,
depositAddressCreated,
complete,
failedPayment,
bankPayoutDetailsAdded,
awaitingPayment,
awaitingOriginOrderCompletion,
awaitingTransferReissue,
awaitingPayout,
awaitingAsyncPayout,
awaitingAsyncPayment,
awaitingBridgeRouting,
failedFill,
failedTransfer,
failedQuote,
failedProcessorRouting,
failedLiquidityRouting,
failedFees,
incorrectAmountPaid,
insufficientLiquidityFailed,
depositAddressFailed,
addressCheckFailed,
refundFailed,
refundComplete,
bridgeOrderCreationFailed,
bridgeOrderRoutingFailed,
bridgeTransferFailed,
depositAmountMismatchFailed,
failedUnknown,
expired
crypto
enum<string>

The type of cryptocurrency used in the order.

Available options:
USDC,
USDC_POLYGON_NXTB,
SOL_USDC_PTHX,
USDT_POLYGON,
USDT_ERC20,
TRX_USDT_S2UZ
side
enum<string>

The side of the order, indicating whether it's a buy or sell order.

Available options:
buy,
sell
fiat
enum<string>

The type of fiat currency used in the order.

Available options:
USD,
MXN,
PEN
createdAt
string

The date and time when the order was created.

Example:

"2024-06-05T19:35:17.436Z"

cryptoAddress
string

The address associated with the cryptocurrency used in the order.

Example:

"0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C"

country
enum<string>

The country where the user is located.

Available options:
MX,
PE,
US
amountFiat
number

The total amount of the order in fiat currency.

Example:

1000

amountCrypto
number

The total amount of the order in cryptocurrency.

Example:

55.51

fees
object

Details of the applied fees.

price
number

Price of the cryptocurrency.

Example:

0.0568362449619

notes
string

Additional notes about the order.

Example:

"Description"

expiredQuotes
string[]

List of expired quotes.

id
string

Unique identifier of the order.

Example:

"6660bdf5cc4633bc64122f3c"