{ "opencollection": "1.0.0", "info": { "name": "Platform Server Accounts Rates API", "version": "3.0.0" }, "items": [ { "info": { "name": "Rates", "type": "folder" }, "items": [ { "info": { "name": "Retrieve Rates", "type": "http" }, "http": { "method": "GET", "url": "https://platform-server.exampleanchor.com/rate", "params": [ { "name": "type", "value": "", "type": "query", "description": "The type of rate requested. If `firm`, the response must include `rate.id` and `rate.expires_at`." }, { "name": "client_id", "value": "", "type": "query", "description": "An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\n\nClient IDs will be the Stellar public key the public key used to authenticate via SEP-10. Anchors must ensure\nthat the public key specified in the request matches a public key known to belong to the sending anchor.\n\nThis parameter will only be specified if the client is authenticated via SEP-10. Anchors can define whether or not\nauthentication is required for fetching indicative rates. Firm rates always require authentication.\n" }, { "name": "sell_asset", "value": "", "type": "query", "description": "The asset the client application will send to the anchor in exchange for `buy_asset` in\n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n" }, { "name": "buy_asset", "value": "", "type": "query", "description": "The asset the that the anchor will send in exchange for `sell_asset` in\n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n" }, { "name": "sell_amount", "value": "", "type": "query", "description": "The amount of `sell_asset` the client application will send in exchange for `buy_asset`. Will not be used in\nconjunction with `buy_amount`.\n" }, { "name": "buy_amount", "value": "", "type": "query", "description": "The amount of `buy_asset` the anchor will send in exchange for `sell_asset`. Will not be used in conjunction\nwith `sell_amount`.\n" }, { "name": "country_code", "value": "", "type": "query", "description": "The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the user's current address.\nAnchors should expect this parameter to be provided if one of the assets of the buy/sell pair is fiat and it\nis available in two or more countries.\n" }, { "name": "expire_after", "value": "", "type": "query", "description": "The client's desired `expires_at` date and time for the quote that can be used if this is a firm quote. This should\nbe a [UTC ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) string. Anchors should return `400 Bad\nRequest` if an expiration date on or after the requested value cannot be provided.\n" }, { "name": "sell_delivery_method", "value": "", "type": "query", "description": "The method the client or user will use to deliver `sell_asset` to the Anchor. This value may affect the\nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjunction with `buy_delivery_method`.\n" }, { "name": "buy_delivery_method", "value": "", "type": "query", "description": "The method the client or user wants used to receive `buy_asset` from the Anchor. This value may affect the\nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjunction with `sell_delivery_method`.\n" } ] }, "docs": "Transactions that involve two non-equivalent on & off-chain assets (such as USDC on Stellar and fiat EUR) must\nuse exchange rates that are communicated to the client application requesting the transaction. When clients make\nrequests to the Platform for these exchange rates, the Platform sends this request to the anchor to fetch it.\n\nRates can be [indicative](https://www.investopedia.com/terms/i/indicativequote.asp) or\n[firm](https://www.investopedia.com/terms/f/firmquote.asp). The anchor must pr" } ] } ], "bundled": true }