API - Call the FairShift Shift Asset Exchange just as easily with code

Initiate new deposit

https://fairshift.io/apiDeposit?Pair=<Pair>&ReceiveAddress=<YourReceiveAddress>&RefundAddress=<OptionalRefundAddress>

This is the only call you have to make if you want to exchange some coins. It will return the Deposit address in the deposit currency and wait for the deposit the same way as clicking continue on the main page.

Currently the API is available via Http Get calls, please contact support if you need additional features.

Parameters (Pair and ReceiveAddress are always required):

Returns a text string without any further formatting: Some examples:



Get exchange rate

https://fairshift.io/apiExchangeRate?Pair=LTC-DASH
This allows you to get the current exchange rate for depositing LTC and receiving DASH, you can use the same pairs as described above. Any supported coin can be exchange to any other supported coin (just not to itself).
https://fairshift.io/apiExchangeRate?Pair=BTC-DASH&depositAmount=0.01
You can also specify the depositAmount (in quick mode) to receive an exact number of ReceiveCoins you would receive.
https://fairshift.io/apiExchangeRate?Pair=BTC-DASH&precise=true&receiveAmount=0.125
If you need to know the exact amount of coins to send in precise mode use this request. Here you would expect to receive 0.125 DASH and the api will return you the amount of BTC you would have to send. Slight fluctuations up to 2% are allowed, but if you wait too long the exchange rate might change and the apiDeposit might fail and refund. Usually the 2% buffer is big enough for a few hours (or even days if the market is not crazy).

Check status

https://fairshift.io/apiStatus?Address=<YourDepositAddress>
After a deposit address has been created (e.g. via the continue button on the start page or the apiDeposit method above) it can always be queried by visiting the /status/<DepositAddress> page with more details and clickable links or simply by calling this api method, which returns one of the 7 supported status codes: Examples:
If you want more details instead of just the status, this can be used to get all data that is displayed on the status page as a json object:
https://fairshift.io/ExchangeStatus?id=<YourDepositAddress>
Examples: