POST
/
api
/
v1
/
reusable-quotes
/
{reusable_quote_id}
/
actions
/
execute
curl --request POST \
  --url https://sandbox-b2b.ripio.com/api/v1/reusable-quotes/{reusable_quote_id}/actions/execute/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "base_amount": 2,
  "end_user_id": "customer_1",
  "op_type": "BUY",
  "external_ref": "ex_op_1"
}'
{
  "id": "a61d1778-e0bc-48a1-af92-085b5aeb0691",
  "quote_id": "31f68fdb-2271-4f58-99d3-4a0b62c9d489",
  "txn_id": "1a9f9703-55ab-486d-9a4d-b0a7bc3ac507",
  "end_user_id": "customer_1",
  "rate": "1.00060000",
  "charged_fee": "0.000",
  "base_amount": "5.000000000000000000",
  "quote_amount": "5.002999999999999670",
  "base_asset": "USDT",
  "quote_asset": "USD",
  "created_at": "2021-09-16T15:38:43.115315-03:00"
}

Authorizations

Authorization
string
header
required

B2B’s White Label API uses OAuth2. Currently there is only one supported authentication flow:

  • clientCredentials allows you to access your own B2B account (First-Party Integration) and performs transactions against the public API. This oauth2 flow is well suited for this API, as it allows machine-to-machine communication.

Every call to the API has to be authenticated with an OAuth2 Token. In order to request this token, you will need to have sandbox or production API Keys (client id and client secret) that will be needed to generate a credential in order to negotiate an ephemeral access token.

Every request must be accompianed by an Authorization header with a value that follows the following schema: Bearer ACCESS_TOKEN

Path Parameters

reusable_quote_id
string
required

Body

end_user_id
string
required

Indicates End User external_ref.

op_type
enum<string>
required

Indicates the operation type.

Available options:
BUY,
SELL
external_ref
string
required

Arbitrary identifier issued by the partner. Serves as an external identifier for lookups.

base_amount
number

Specifies the amount of crypto to buy or sell.

quote_amount
number

Specifies the amount of fiat to buy or sell.

Response

201
application/json
Successful response

If the transaction represents a BUY, SELL or SWAP operation, this object will detail the trade operation information.

id
string
required

UUID used as trade identifier.

txn_id
string
required

UUID used as Transaction identifier. Useful to relate this object trade with a transaction object.

quote_id
string
required

UUID used as quote identifier.

end_user_id
string
required

Arbitrary string used as end_user identifier.

rate
string
required

Indicates the exchange rate used for conversion.

charged_fee
string
required

Indicates trade's applied fee.

base_amount
string
required

Indicates the amount of units or equivalence in the quote for base currency.

quote_amount
string
required

Indicates the amount of units or equivalence in the quote for quote currency.

base_asset
string
required

Indicates the base currency involved in the quotation.

quote_asset
string
required

Indicates the quote currency involved in the quotation.

created_at
string
required

ISO DateTime indicating creation date of trade.