Skip to content

Smart Liquidation API (1.0.0)

The Smart Liquidation service splits large XRP liquidations into smaller liquidations over a specified time period. For more information, see Smart Liquidation.

Check out the best practices and tutorials.

Authentication

All API operations require a bearer access token for your target environment.<br>Learn how to request the access token.

API environments

The Smart Liquidation API assigns a [domainPrefix] based on the environment. Your tenant information is automatically derived from your API credentials.

EnvironmentDomain PrefixDomainBase URL
Testliquidation-test.pub.prodripplenet.com<div style="font-size: 13px;font-family:'Red Hat Mono'; !important">liquidation-test.pub.prod.ripplenet.com</div>
Productionliquidation.pub.prodripplenet.comliquidation.pub.prod.ripplenet.com

For more information about base URLs, see API base URLs.

Languages
Servers
Mock server

https://docs.ripple.com/_mock/products/payments-odl/api-docs/smart_liquidation/smart_liquidation/

Test environment<br/>Learn about <a href="https://docs.ripple.com/ripplenet/implementation/baseurls/#base-url-by-api-environment" class="api-console-href">API environments</a>

https://liquidation-test.pub.prod.ripplenet.com/

Production environment

https://liquidation.pub.prod.ripplenet.com/

Liquidations

Operations

bridgeAssets

Operations

liquidations

Operations

Creates a new operator triggered liquidation

Request

Security
Bearer
Headers
X-CORRELATION-IDstring
Bodyapplication/jsonrequired
unique_reference_idstringrequired
ripplenet_payment_idstring(uuid)required
destination_amountnumber(decimal)required
expires_atstring(date-time)
Example: "2018-04-06T20:33:35Z"
curl -i -X POST \
  https://docs.ripple.com/_mock/products/payments-odl/api-docs/smart_liquidation/smart_liquidation/liquidations/operator \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-CORRELATION-ID: string' \
  -d '{
    "unique_reference_id": "string",
    "ripplenet_payment_id": "7bb2080a-9fd7-4f64-af96-119671501c9c",
    "destination_amount": 0,
    "expires_at": "2018-04-06T20:33:35Z"
  }'

Responses

Returns the liquidation created

Bodyapplication/json
idstring(uuid)required

Unique liquidation identifier

account_idstringrequired

The identifier of the account requesting the liquidation

created_atstring(date-time)required

Date specified in ISO-8601 format, for example 2018-04-06T20:33:35Z

Example: "2018-04-06T20:33:35Z"
modified_atstring(date-time)required

Date specified in ISO-8601 format, for example 2018-04-06T20:33:35Z

Example: "2018-04-06T20:33:35Z"
unique_reference_idstringrequired

The unique 32-character string representing the liquidation

ripplenet_payment_idstring(uuid)

Unique identifier for a RippleNet payment

ripplenet_payment_created_atstring(date-time)

Timestamp when the RippleNet payment was created

ripplenet_sender_addressstring

RippleNet address of the sender

Example: "sf_gbp@rn.us.ca.san_francisco"
ripplenet_receiver_addressstring

RippleNet address of the receiver

Example: "sf_gbp@rn.us.ca.san_francisco"
destination_amountnumber(decimal)required

The total amount available for withdrawal after all fees have been collected

Example: 10000
destination_currencystringrequired

The 3-letter currency code of the destination currency

Example: "usd"
destination_venuestringrequired

The name of the exchange where XRP is liquidated into fiat currency

Example: "bitso"
bridge_currency_codestringrequired

Bridge crypto currency to liquidate into destination currency. Will be required in future versions.

crypto_deposit_amountnumber(decimal)

The deposit amount of the crypto currency bridge asset (XRP)

crypto_deposit_venue_idstring

The venue ID for the crypto currency bridge asset (XRP) deposit transaction

estimate_typestring
Enum"firm""indicative"
expires_atstring(date-time)

The expiration time of the liquidation

Example: "2018-04-06T20:33:35Z"
liquidation_sourcestringrequired
Enum"xrrn""operator"
statusstringrequired
Enum"CREATED""QUEUED""STARTED""COMPLETED""PARTIALLY_COMPLETED""FAILED"
trade_requestsArray of objectsrequired

An array of trade objects representing the trades of the liquidation

idstring(uuid)required

Unique liquidation identifier

account_idstringrequired

The identifier of the account requesting the liquidation

created_atstring(date-time)required

Date specified in ISO-8601 format, for example 2018-04-06T20:33:35Z

Example: "2018-04-06T20:33:35Z"
modified_atstring(date-time)required

Date specified in ISO-8601 format, for example 2018-04-06T20:33:35Z

Example: "2018-04-06T20:33:35Z"
liquidation_idstringrequired

The identifier of the liquidation

sequence_numberintegerrequired

The sequence number of the liquidation trade

odl_payment_idstring

The identifier of the ODL payment corresponding to the liquidation

statusstringrequired
Enum"CREATED""QUEUED""THROTTLED""QUOTED""STARTED""COMPLETED""PARTIALLY_COMPLETED""FAILED""FAILED_RETRYABLE"
bridge_currency_codestringrequired
destination_amountnumber(decimal)required

The total amount available for withdrawal after all fees have been collected

destination_currencystringrequired

The 3-letter currency code of the destination currency of the trade

destination_venuestringrequired

The name of the trade exchange where XRP is liquidated into fiat currency

expires_atstring(date-time)required

The expiration time of the liquidation trade

Example: "2018-04-06T20:33:35Z"
xrp_deposit_amountnumber(decimal)

The XRP deposit amount of the trade

trade_executionsArray of objectsrequired

The trade execution objects

idstring(uuid)required

Unique liquidation identifier

account_idstringrequired

The identifier of the account requesting the liquidation

created_atstring(date-time)required

Date specified in ISO-8601 format, for example 2018-04-06T20:33:35Z

Example: "2018-04-06T20:33:35Z"
modified_atstring(date-time)required

Date specified in ISO-8601 format, for example 2018-04-06T20:33:35Z

Example: "2018-04-06T20:33:35Z"
trade_request_idstringrequired

The identifier of the trade request

venuestringrequired

The exchange used by this trade

venue_idstring

The mapped id for the exchange used by this trade

amountnumber(decimal)

The amount of XRP sent by this trade

adjusted_amountnumber(decimal)

The adjusted amount of XRP sent by this trade

proceedsnumber(decimal)

The amount of XRP liquidated

adjusted_proceedsnumber(decimal)

The adjusted amount of XRP liquidated

start_datestring(date-time)

Start date (inclusive) of last activity

Example: "2018-04-06T20:33:35Z"
end_datestring(date-time)

Start date (inclusive) of last activity

Example: "2018-04-06T20:33:35Z"
incentive_typestring

The type of incentive (also called slippage)

incentive_valuenumber(decimal)

Amount of incentive (also called slippage) used

is_pushed_forwardboolean

True if the funds from a failed trade will be made available in fiat currency

adjusted_trade_differencenumber

The trade amount including incentives

executed_slippage_bpsinteger
error_messagestring

The reason why a trade failed

estimated_trade_displacement_bpsinteger

trade displacement bps in estimate

execution_strategyobject

The trade execution strategy

maxAmountPerTradenumber(decimal)required

The maximum amount (in destination currency) per trade

minimumTradeIntervalintegerrequired

The minimum interval (in seconds) between creation of trades

execution_summaryobjectrequired

The trade execution summary

total_xrpnumber(decimal)required

Total amount of XRP successfully liquidated

total_fiatnumber(decimal)required

Total fiat amount available for withdrawal after all fees have been collected

total_slippagenumber(decimal)required

Total amount of slippage (also called incentive) used

total_sender_feesnumber(decimal)required

Total XRP sender fees

total_receiver_feesnumber(decimal)required

Total fiat receiver fees

total_tradesintegerrequired

The total number of exchange orders/trades completed

fx_ratenumber(decimal)

The conversion rate from XRP to destination currency (fiat)

incentive_typestring
trading_summaryobject

The trading summary

total_fiat_executednumber(decimal)

the total amount of successfully delivered fiat

total_fiat_in_flightnumber(decimal)

the total amount of fiat in flight (started but not yet finished trades)

total_fiat_non_deliverablenumber(decimal)

the total amount of fiat that was not successfully confirmed to have been delivered due to unknown trade failures

total_fiat_remaining_deliverablenumber(decimal)

the total amount of fiat that has not yet been delivered but is eligible to be delivered

Response
application/json
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "account_id": "string", "created_at": "2018-04-06T20:33:35Z", "modified_at": "2018-04-06T20:33:35Z", "unique_reference_id": "string", "ripplenet_payment_id": "7bb2080a-9fd7-4f64-af96-119671501c9c", "ripplenet_payment_created_at": "2019-08-24T14:15:22Z", "ripplenet_sender_address": "sf_gbp@rn.us.ca.san_francisco", "ripplenet_receiver_address": "sf_gbp@rn.us.ca.san_francisco", "destination_amount": 10000, "destination_currency": "usd", "destination_venue": "bitso", "bridge_currency_code": "string", "crypto_deposit_amount": 0, "crypto_deposit_venue_id": "string", "estimate_type": "firm", "expires_at": "2018-04-06T20:33:35Z", "liquidation_source": "xrrn", "status": "CREATED", "trade_requests": [ {} ], "execution_strategy": { "maxAmountPerTrade": 0, "minimumTradeInterval": 0 }, "execution_summary": { "total_xrp": 0, "total_fiat": 0, "total_slippage": 0, "total_sender_fees": 0, "total_receiver_fees": 0, "total_trades": 0, "fx_rate": 0, "incentive_type": "string" }, "trading_summary": { "total_fiat_executed": 0, "total_fiat_in_flight": 0, "total_fiat_non_deliverable": 0, "total_fiat_remaining_deliverable": 0 } }