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/reference/openapi/

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

Authentication with Smart Liquidation Service

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

Domain prefixes with Smart Liquidation Service

EnvironmentDomain PrefixRequest URL
Testliquidation-test.pub.prodhttps://liquidation-test.pub.prod.ripplenet.com
Productionliquidation.pub.prodhttps://liquidation.pub.prod.ripplenet.com

Get liquidations

Request

List all liquidations by date range

Security
Bearer
Query
start_datestring(date-time)

Start date (inclusive) of first activity. Specified in ISO-8601 format, for example 2018-08-06T23:13:55.997Z

end_datestring(date-time)

End date (exclusive) of last activity. Specified in ISO-8601 format, for example 2018-08-06T23:13:55.997Z

payment_idArray of strings(uuid)

RippleNet payment ID(s)

reference_idArray of strings

Unique reference ID(s)

statusstring

Liquidation status

pageinteger

The page number for paginated results. The value is zero-based, where 0 represents the first page.<br/> Set it to 0 to get the first page of results.

Default 0
sizeinteger[ 1 .. 200 ]

Number of liquidations to return per page.

Default 50
curl -i -X GET \
  'https://docs.ripple.com/_mock/products/payments-odl/api-docs/smart_liquidation/reference/openapi/liquidations?start_date=2019-08-24T14%3A15%3A22Z&end_date=2019-08-24T14%3A15%3A22Z&payment_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&reference_id=string&status=string&page=0&size=50' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Returns a paginated list of liquidations

Bodyapplication/json
firstbooleanrequired

True if this is the first page

lastbooleanrequired

True if this is the last page

numberintegerrequired

Page number

numberOfElementsintegerrequired

Number of elements in this request

sizeintegerrequired

Number of objects returned per page

totalElementsinteger(int64)required

Total number of elements for the given request

totalPagesintegerrequired

Total number of pages for the given request

sortArray of objectsrequired

Sort details of this page

directionstring

Direction of the sort

Example: "ASC"
propertystring

Property name to sort on

ascendingboolean

True if the sort direction is ascending

Example: true
descendingboolean

True if the sort direction is descending

Example: false
resultsArray of objectsrequired

Array of all liquidation objects that match the specified query parameters, if any

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"
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"
Response
application/json
{ "first": true, "last": true, "number": 0, "numberOfElements": 0, "size": 0, "totalElements": 0, "totalPages": 0, "sort": [ {} ], "results": [ {} ] }

Get liquidation by Id

Request

Get a specific liquidation by its unique Id value

Security
Bearer
Path
idstring(uuid)required

Unique identifier of the liquidation. Obtain this value by performing a GET liquidations operation.

curl -i -X GET \
  'https://docs.ripple.com/_mock/products/payments-odl/api-docs/smart_liquidation/reference/openapi/liquidations/{id}' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Returns a liquidation

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"
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", "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 } }

Get liquidations by payment Id

Request

Get a list of liquidations associated with a ripplenet_payment_id

Security
Bearer
Path
ripplenet_payment_idstring(uuid)required

Unique identifier for a RippleNet payment. Obtain this value by performing a GET liquidations operation.

curl -i -X GET \
  'https://docs.ripple.com/_mock/products/payments-odl/api-docs/smart_liquidation/reference/openapi/liquidations/ripplenet-payment-id/{ripplenet_payment_id}' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Returns a list of liquidations associated with the given ripplenet_payment_id

Bodyapplication/jsonArray [
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"
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", "estimate_type": "firm", "expires_at": "2018-04-06T20:33:35Z", "liquidation_source": "xrrn", "status": "CREATED", "trade_requests": [], "execution_strategy": {}, "execution_summary": {}, "trading_summary": {} } ]