Skip to navigation

Create an XLM Manage Sell Offer request or Create Passive...

This endpoint creates an XLM Manage Sell Offer or Create Passive Sell Offer request. Required role: RequestCreator. This API can be made idempotent by generating an ID for the Request beforehand and passing it as the externalRequestId attribute

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

Creates (or modifies an existing) XLM Sell Offer Request. Selling asset is the asset associated to the address identified by fromAddressId.

fromAddressIdstringRequiredformat: "uint64"
pricestringRequired

Price of 1 unit of selling in terms of buying, as a string representing a floating point number. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be 5/30 = '0.1666667'

amountstringOptional

Amount of the selling asset to sell, in the smallest currency unit, based on the currency decimals. For example, 1 corresponds to 1 'stroop' (one ten-millionth of XLM), and 1 XLM corresponds to 10000000 (7 decimals). If set to 0, deletes the offer identified by offerID

feeLimitstringOptional
buyingAssetIDstringOptional
Specify asset to be bought in the offer. Leave empty for XLM native
buyingAssetIssuerstringOptional
Specify asset to be bought in the offer. Leave Empty for XLM native
commentstringOptional
offerIDstringOptionalformat: "int64"
ID of the offer to be modified. If 0, a new offer is created. Cannot be set if isPassive is true
isPassivebooleanOptional

If true, creates a Passive Sell offer that will not consume a counter offer that exactly matches this offer. This is useful for offers meant to be 1:1 exchanges for path payments

externalRequestIdstringOptional
Identifier for the request in the user's system. This must be unique. Attempting to create a request with an existing externalRequestId will do nothing and return the originally created request

Response

A successful response.
resultobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error
503
Service Unavailable Error