PATCH
/
api
/
orders
/
{id}
curl --request PATCH \
  --url https://app.sandbox.rio.trade/api/orders/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "notes": "<any>",
  "attributes": "<any>"
}'
{
  "quoteId": "665f407ad6c964829d639e1d",
  "userId": "65a99abb6a92bda6e52bf7af",
  "status": "created",
  "crypto": "USDC",
  "side": "buy",
  "fiat": "USD",
  "createdAt": "2024-06-05T17:09:13.514Z",
  "cryptoAddress": "TS9kzAVq4PR7xNoQDJXSP6Kgi8GFbwUbzg",
  "country": "MX",
  "amountFiat": 30000,
  "amountCrypto": 1664.53,
  "fees": {
    "processingFeeFiat": 0,
    "transferFeeFiat": 52.71985595768261,
    "brokerFeeFiat": 0,
    "brokerFeeFiatTax": 0,
    "platformFeeFiat": 600,
    "platformFeeFiatTax": 96
  },
  "destinationOfFunds": {
    "blockchainAddress": "TS9kqAVq4PR7xNoQDJXSP6Kgz8GFbwUbzi",
    "accountHolderName": "John Doe",
    "accountNumber": "1234567890",
    "CCI": "00111233001112345678",
    "CLABE": "014027000000000008"
  },
  "price": 0.0568673040717,
  "netPrice": 0.05554,
  "notes": "New note",
  "payoutBankAccountId": "660c10c6eb4fbb235708b8e8",
  "expiredQuotes": [
    "<string>"
  ],
  "USBankTransferMethod": "ach_push",
  "id": "66609bb9cc4633bc64122684"
}

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

Order id to be updated.

Body

application/json
notes
any
attributes
any

Response

200
application/json
OK
quoteId
string

Unique identifier of the quote.

Example:

"665f407ad6c964829d639e1d"

userId
string

Unique identifier of the user.

Example:

"65a99abb6a92bda6e52bf7af"

status
enum<string>

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>

Type of cryptocurrency involved in the order.

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

Indicates if the order is a buy or sell order.

Available options:
buy,
sell
fiat
enum<string>

Type of fiat currency involved in the order.

Available options:
USD,
MXN,
PEN
createdAt
string

Timestamp indicating when the order was created.

Example:

"2024-06-05T17:09:13.514Z"

cryptoAddress
string

Address associated with the cryptocurrency in the order.

Example:

"TS9kzAVq4PR7xNoQDJXSP6Kgi8GFbwUbzg"

country
enum<string>

Country of residence of the user.

Available options:
MX,
PE,
US
amountFiat
number

Amount involved in the order in terms of fiat currency.

Example:

30000

amountCrypto
number

Amount involved in the order in terms of cryptocurrency.

Example:

1664.53

fees
object

Details about the fees

destinationOfFunds
object

Details about the destination of funds

price
number

The price of the cryptocurrency

Example:

0.0568673040717

netPrice
number

The net price of the cryptocurrency

Example:

0.05554

notes
string

Any additional notes

Example:

"New note"

payoutBankAccountId
string

The unique identifier of the bank account to which the payout will be sent

Example:

"660c10c6eb4fbb235708b8e8"

expiredQuotes
string[]

List of expired quotes

USBankTransferMethod
enum<string>

Indicates bank transfer method, applies only to the United States.

Available options:
ach_push,
wire
id
string

The ID of the order

Example:

"66609bb9cc4633bc64122684"