Back to top

faast SWAP API

faast logo

  • Current Version: 0.1

  • For changes, see History

This document describes the faast REST-like API to be used to easily convert between any digital currency.

Introduction

Overview

The goal of the faast API is to provide an instant, and secure method to convert from one digital currency to another. To achieve this, a user specifies which currency they possess (deposit currency), and which currency they would like to obtain (withdrawal currency), as well as a wallet address for the currency they would like to obtain.

The faast API then generates a unique deposit wallet address for the “deposit currency”, where the user can send any arbitrary amount of digital currency. Upon noticing any transaction on this deposit address faast will immediately fullfill an order at the current market rate, and send an equivalent amount of “withdrawal currency” to the users specified “wallet address”.

faast never takes custody of users digital currency, and has no user account system. It is designed for instant, safe, and secure conversion in between any arbitrary set of digital currencies.

Basic flow

Order creation:

  1. Get a current price/rate (varies in real time with market)

  2. Generate an order and deposit address

  3. Send digital currency to the deposit address

  4. Monitor the status for completion

Integration Testing

faast provides a staging server that can be used for integration testing. It provides the same API, but with the following differences:

  • It uses the TestNet bitcoin and ethereum (ropsten) test network, and thus expects testnet addresses and coins (eg. mqdofsXHpePPGBFXuwwypAqCcXi48Xhb2f)

  • ERC20 Tokens are all a single custom faast Token on ropsten address: 0xe72bbed5cf09686c62ed5be8f571a7670c11c468

  • testnet coins may or may not be sent to the testnet address provided, depending on how our staging servers are configured

The testing base url is https://testapi.faa.st

Authentication

faast currently has no authentication required. In the future, authentication may be required for additional features or preferred pricing.

Base URL

Production

The production base URL is https://api.faa.st

Test

The test base URL is https://testapi.faa.st

GET Requests

Get a price/rate

Get a price/rate
GET/api/v1/public/rate/{pair}

This will return a price for a selected currency pair

Example URI

GET /api/v1/public/rate/btc_eth
URI Parameters
HideShow
pair
string (required) Example: btc_eth

The pair is depositCurrency_withdrawalCurrency.

Request
HideShow
Headers
Content-Type: application/json
Body
{}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
        pair: 'btc_eth',
        rate: 12.19512344,
        outgoing_network_fee: 0.005
    }

Get a transaction status

Get a transaction status
GET/api/v1/public/txStat/{depositAddress}

This will return a transaction status based on the deposit address

Example URI

GET /api/v1/public/txStat/n2NAwrZRKRZhpupQgRh6LQ3xG9j5zd44Nj
URI Parameters
HideShow
depositAddress
string (required) Example: n2NAwrZRKRZhpupQgRh6LQ3xG9j5zd44Nj

The deposit address is of format depositCurrency.

Request
HideShow
Headers
Content-Type: application/json
Body
{}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
        address: 'n2NAwrZRKRZhpupQgRh6LQ3xG9j5zd44Nj',
        withdraw: '0x33ec06a42f7d6b4ceca597edaf28ff1580b283df',
        status: 'complete',
        incomingCoin: 0.001,
        incomingType: 'BTC',
        outgoingCoin: 0.00941845,
        outgoingType: 'ETH',
        transaction: '0x186ae0603e6cca00528cae9aa27eab0e68630efea38fb95b4026eb36e9f15bda'
    }

POST Requests

Create a swap

Create a swap
POST/api/v1/public/shift/

Create a new swap order, and generate a deposit address.

Example URI

POST /api/v1/public/shift/
Request
HideShow
Headers
Content-Type: application/json
Body
{
    withdrawal: '0x33ec06a42f7d6b4ceca597edaf28ff1580b283df',
    pair: 'btc_eth'
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
    orderId: 'FAST5183650454831104FLIP5674142984568832',
    deposit: 'mu9xkUyB1CBXrwgnQ9efvRQde7Jdj2e9Xs',
    depositType: 'btc',
    withdrawal: '0xf9357f4fdef81103ed55296649a7cacf04e80ef3',
    withdrawalType: 'eth',
    public: null
}

Supported Currencies

NOTE: This list is not necessarily up to date, please verify through the API for up-to-date deposit and withdrawal information!

Supported Currencies

  • BTC: Bitcoin

  • ETH: Ether

  • 1ST: Firstblood

  • AIR: AirToken

  • ANT: Aragon

  • ART: Maecenas

  • BMC: Black Moon

  • BNT: Bancor

  • CDT: Coindash

  • CFI: Cofound.it

  • COSS: COSS

  • DGD: Digix DAO

  • DICE: Etheroll

  • DLT: Agrello

  • DNT: district0x

  • EDG: Edgeless

  • EDO: Eidoo Token

  • EOS: EOS

  • ETBS: EthBits

  • FUN: FunFair

  • GNO: Gnosis

  • GUP: Guppy

  • ICN: Iconomi

  • ICOS: ICOBox

  • IXT: iXledger

  • KICK: KickCoin

  • LIFE: Life

  • LRC: Loopring

  • LUN: Lunyr

  • MCAP: MCAP

  • MNE: Minereum

  • MTH: Monetha

  • OAX: OpenANX

  • OMG: OmiseGO

  • OPT: Opus

  • PAY: TenX Pay Token

  • PIX: Lampix

  • PLBT: Polybius

  • PLU: PLU

  • POE: Po.et

  • PPT: Populous

  • PTOY: Patientory

  • QAU: Quantum

  • REP: Augur

  • RLC: iEx.ec

  • RVT: Rivetz

  • SKIN: SkinCoin

  • SNC: SunContract

  • SNGLS: SingularDTV

  • SNT: Status Network Token

  • STX: Stox

  • SUB: Substratum

  • SWT: Swarm City Token

  • TFL: Trueflip

  • TIME: Chronobank Time

  • TKN: TokenCard

  • TNT: Tierion

  • TRST: Trustcoin

  • VEN: VeChain

  • VERI: Veritaseum

  • VIB: Viberate Token

  • VIBE: Vibe Coin

  • VOISE: Voise

  • WINGS: Wings DAO

  • XAUR: Xaurum

  • ZRX: 0x

  • CVC: Civic

  • GNT: Golem

  • HKG: HackerGold

  • MLN: Melon

  • HMQ: Humaniq

  • BAT: Basic Attention Token

  • QRL: Quantum Resistant Ledger

  • CRB: CreditBit

  • MYST: Mysterium

  • NMR: Numeraire

  • MCO: Monaco

  • ADT: adToken

  • MTL: METAL

  • STORJ: STORJ

  • ADX: AdEx

  • MANA: Decentraland

  • SALT: Salt

  • TIX: Blocktix

History

Version 0.1:

  • Add currently supported APIs

  • GET rate

  • GET txStat

  • POST shift

  • Add initial list of supported Deposit and withdrawal Currencies

Generated by aglio on 27 Oct 2017