post https://spectrocoin.com/api/public/exchanges
This endpoint allows users to perform a currency exchange. There are two ways to perform an exchange:
-
Using Currency Codes: You can specify the
payCurrencyCode
andreceiveCurrencyCode
to define the currencies involved in the exchange. This method provides flexibility for dynamically selected currencies. -
Using an Exchange Pair ID: If you already have a predefined
exchangePairId
, you can use it along withpayAccountId
, which can be retrieved viaGET /public/accounts
andreceiveAccountId
can be retrieved viaGET /public/exchanges/pairs/ids
to identify the specific exchange pair and the accounts involved.In both cases, you must specify thepayAmount
(the amount of currency being paid) to complete the exchange.