v1 fields are not returned by default and are not enabled for new accounts.
They are only returned to accounts where v1 has been enabled, and v2 fields
are returned to everyone. If you need v1 fields while you migrate, ask your
account manager to enable them. v1 request fields such as
crypto, fiat,
side, amountFiat and amountCrypto are still accepted, so you can
migrate responses first and requests second.Naming currencies
crypto becomes asset plus network. Fiat codes are unchanged and are asset values without a network. The current list is in supported currencies.
Creating a quote
A buy becomes a quote whoseorigin is fiat and whose destination is a stablecoin. A sell is the reverse. The amount you want to fix goes on the matching leg, and exactly one leg carries an amount.
network. The settlement inputs move under a settlement object with the same paths the response uses: twoWaySettlementType becomes settlement.timing and twoWaySettlementDateOffset becomes settlement.valueDateOffset. Every other request field (orderType, limitNetPrice, timeInForceStartsAt, timeInForceEndsAt, userId) keeps its name.
When creating an order, the address Rio pays out to is payoutAddressId (v1: userAddressId).
A stablecoin on both legs is a swap, which has no v1 equivalent.
Quote and order fields
id, status, quoteId, userId, expiresAt, marketPrice, netPrice, orderType, limitNetPrice, clientReferenceId, notes and the createdAt and updatedAt timestamps are unchanged.
Prices are expressed as units of the destination asset per unit of the origin asset, so destination.amount = origin.amount * netPrice. Pass limitNetPrice in the same orientation.
Addresses, bulk payments and payouts
Crypto addresses and bulk crypto payments are created withasset and network instead of crypto, and return both fields. Their responses still include crypto. The memo of a Stellar address is registered in the memo field.
Bank accounts, bank payments and bank payouts are unchanged and keep using fiat, whose values are the same codes used as fiat asset values.
Filtering and exporting orders
The orders list, the export endpoint and the spot market price acceptasset and an optional network in addition to the crypto, fiat and side filters. The list also accepts flow.
Checklist
1
Read the new fields
Switch your parsing of quotes, orders and
orders webhooks to flow, origin, destination, pricingDetails and settlement using the table above. You can compare both side by side while v1 fields are enabled on your account.2
Send the new fields
Replace
side, crypto, fiat, amountFiat and amountCrypto in quote requests with origin and destination legs, and replace crypto with asset and network when creating addresses and bulk crypto payments.3
Drop the v1 fields
Once nothing reads them, ask your account manager to disable v1 fields on your account.
Disclaimer: All technical documentation is subject to the terms and
conditions, which apply supplementarily and take precedence over the
documentation.