{ "opencollection": "1.0.0", "info": { "name": "Platform Server Accounts Offers API", "version": "3.0.0" }, "items": [ { "info": { "name": "Offers", "type": "folder" }, "items": [ { "info": { "name": "List All Offers", "type": "http" }, "http": { "method": "GET", "url": "https://platform-server.exampleanchor.com/offers", "params": [ { "name": "sponser", "value": "", "type": "query", "description": "Account ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a subentry (trustline, offer, or data entry) which is sponsored by the given account ID." }, { "name": "seller", "value": "", "type": "query", "description": "The account ID of the offer creator." }, { "name": "selling_asset_type", "value": "", "type": "query", "description": "The type for the selling asset. Either native, credit_alphanum4, or credit_alphanum12." }, { "name": "selling_asset_issuer", "value": "", "type": "query", "description": "The Stellar address of the issuer of the asset being sold (base asset). Required if the `selling_asset_type` is not `native`." }, { "name": "selling_asset_code", "value": "", "type": "query", "description": "The code for the asset being sold (base asset). Required if the `selling_asset_type` is not `native`." }, { "name": "buying_asset_type", "value": "", "type": "query", "description": "The type for the asset being bought (counter asset). Either `native`, `credit_alphanum4`, or `credit_alphanum12`." }, { "name": "buying_asset_issuer", "value": "", "type": "query", "description": "The Stellar address of the issuer of the asset being bought (counter asset). Required if the `buying_asset_type` is not `native`." }, { "name": "buying_asset_code", "value": "", "type": "query", "description": "The code for the asset being bought (counter asset). Required if the `buying_asset_type` is not `native`." }, { "name": "cursor", "value": "", "type": "query", "description": "A number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record." }, { "name": "order", "value": "", "type": "query", "description": "A designation of the order in which records should appear. Options include `asc` (ascending) or `desc` (descending). If this argument isn’t set, it defaults to `asc`." }, { "name": "limit", "value": "", "type": "query", "description": "The maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10." } ] }, "docs": "This endpoint lists all currently open offers and can be used in streaming mode. Streaming mode allows you to listen for new offers as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known offer unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream offers created since your request time. When filtering by buying or selling arguments, you must use a combination of selling_asset" }, { "info": { "name": "Retrieve an Offer", "type": "http" }, "http": { "method": "GET", "url": "https://platform-server.exampleanchor.com/offers/:offer_id", "params": [ { "name": "offer_id", "value": "", "type": "path", "description": "A unique identifier for this offer." } ] }, "docs": "The single offer endpoint provides information on a specific offer." }, { "info": { "name": "Retrieve an Offer's Trades", "type": "http" }, "http": { "method": "GET", "url": "https://platform-server.exampleanchor.com/offers/:offer_id/trades", "params": [ { "name": "offer_id", "value": "", "type": "path", "description": "A unique identifier for this offer." }, { "name": "cursor", "value": "", "type": "query", "description": "A number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record." }, { "name": "order", "value": "", "type": "query", "description": "A designation of the order in which records should appear. Options include `asc` (ascending) or `desc` (descending). If this argument isn’t set, it defaults to `asc`." }, { "name": "limit", "value": "", "type": "query", "description": "The maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10." } ] }, "docs": "This endpoint represents all trades for a given offer and can be used in streaming mode. Streaming mode allows you to listen for trades for this offer as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known trade unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream trades created since your request time." } ] } ], "bundled": true }