Skip to content

Fund Transfer API

martin-nginio edited this page Aug 9, 2019 · 32 revisions

Number Conversion

All numbers used specifically for price and volume, must be converted to an integer for use in Fund Transfer API requests. The conversion is 100000000, or 1E8. For strongly typed programming languages, use of integer variable types is strongly recommended, as decimals will not be accepted by the API.

Account or Routing numbers should not be converted.

Withdraw (Crypto currencies) - Updated 12/4/18

path: /fundtransfer/withdrawCrypto

http POST

body parameters:

  • amount: The amount to transfer, following the number conversion policy at the tope of this page. Required
  • address: Your address on the network for the crypto provided in currency. Required
  • currency: The crypto you would like to withdraw. Required

Please note that currently this call does not return the tx id of the withdrawal as this is just the submission of the request. The actual withdraw process is executed in a separate job.

Example: Withdraw 0.1 Bitcoin to 1EJKj147QmEzywLnLpuxSr6SoPr1p62VBX

sample request:

{"amount":10000000,"address":"1EJKj147QmEzywLnLpuxSr6SoPr1p62VBX","currency":"BTC"}

sample success response:

{
  "success":true,
  "errorCode":null,
  "errorMessage":null,
  "status":"Pending Authorization",
  "fundTransferId":3333,
  "description":"BTC withdraw from [john.smith] to Address: 1EJKj147QmEzywLnLpuxSr6SoPr1p62VBX amount: 0.10000000 fee: 
  0.00000000",
  "creationTime":1550268655538,
  "currency":"XRP",
  "amount":10000000,
  "fee":0
}

Note: Destination tag for Ripple When calling withdrawCrypto API for XRP, pass destination tag with ?dt={tag} as part of the address as per following sample:

{"amount":10000000,"address":"1EJKj147QmEzywLnLpuxSr6SoPr1p62VBX?dt=123456","currency":"XRP"}

in this case value of dt can be any integer.

Withdraw (AUD) - Updated 12/17/18

path: /fundtransfer/withdrawEFT

http POST

Note: This call does not return the tx id of the withdrawal as this is just the submission of the request. The actual withdraw process is executed in a separate job.

Note: Only withdrawal amounts up to 2 decimal places ($0.01) are allowed. After conversion, amounts must have increments of 1E6 (1000000) or larger; amounts cannot have digits other than 0 in the last 6 places, i.e. 123000000 is acceptable, but 123100000 is not. If the withdrawal amount sent is invalid because a converted amount would result in any AUD amounts less than $0.01, the following message will be returned by the API: incorrect number of decimal points.

Example: Withdraw $1000 to your ABC bank account

sample request:

{"accountName":"John Smith","accountNumber":"12345678","bankName":"ABC Bank","bsbNumber":"123456","amount":100000000000,"currency":"AUD"}

sample success response:

{"success":true,"errorCode":null,"errorMessage":null,"status":"Pending Authorization","fundTransferId":794824,"description":"Withdraw from [john.smith@abc.com] to ANZ, John Smith(BSB: 123456, Account: 234567)","creationTime":1561654869515,"currency":"AUD","amount":5000000000,"fee":0}

Fund Transfer History

  • path: /fundtransfer/history
  • method: http GET

Returns a list of deposits and withdraws for all crypto assets and fiat currencies and with ability to paginate between records.

Request params

  1. limit: total number of records to return. value is an integer value between 0 and 200 and is optional.
  2. since: is a long integer value that is used for pagination and is the last record id retrieved from the previous API call. this parameter is optional.
  3. indexForward: boolean value used to indicate whether to retrieve old records or newer records. this parameter is optional (default is false).

Response params

Below is a sample response:

{"success":true,"errorCode":null,"errorMessage":null,"fundTransfers":[
{"status":"Complete","fundTransferId":2222,"description":"Withdraw AUD from [john.smith] to Bank, John Smith(BSB: 123456, Account: 12345678)","creationTime":1489922298280,"currency":"AUD","amount":500000000,"fee":0,"transferType":"WITHDRAW","errorMessage":null,"lastUpdate":1489922299280,"cryptoPaymentDetail":null}
,
{"status":"Complete","fundTransferId":1111,"description":"BITCOIN Deposit, B 0.001","creationTime":1432410317609,"currency":"BTC","amount":1000000,"fee":0,"transferType":"DEPOSIT","errorMessage":null,"lastUpdate":1431510317627,"cryptoPaymentDetail":{"address":"1EJKj147QmEzywLnLpuxSr6SoPr1p62VBX","txId":"e03a9a4b5c557f6ee3400a29ff1475d1df73e9cddb48c2391abdc391d8c1504a"}}
]}

Authentication

This API call uses GET Http request so when signing the request at your end please make sure to add query string as per below:

String path = "/fundtransfer/history"; 
String stringToSign = path + "\n";
if (queryString != null) {
    stringToSign += queryString + "\n";
}
stringToSign += timestamp + "\n";

below is a sample query string: String queryString = "limit=10&since=1&indexForward=true";

You can also call the API without any of the above parameters and in this case queryString will be null and won't affect the signature.

Pagination

Fund transfer history API allows for fetching new or old records given a cursor which is a useful method for retrieving data that changes in real time.

Please note that pagination for this API is slightly different to other APIs (e.g. order/history) and this change was made in order to improve how you can navigate between old and new records.

  1. Default API call: do not pass "since" or "indexForward". you can specify limit. in this case most recent records are returned and records are always sorted with first record being newest record in the list.

  2. Retrieving older records: if you want to retrieve older records based on the first call then use the last record id (in this case fundtransferId) and pass it as since to the new API call with indexForward being false.

  3. Retrieving newer records: if you want to retrieve newer records based on the first call then use the first record id (in this case fundtransferId) and pass it as since to the new API call with indexForward being true.

Fund transfer status

  1. Complete: confirmed and final transaction status
  2. Cancelled: fund transfer has been cancelled (e.g. due to invalid address) 1._ New:_ records with New status are in transition or are not complete. You can ignore any fund transfer with such status.
  3. Error: there has been an error processing the transfer.

Additional notes

  1. when passing since (e.g. since=100) all records greater than (when using indexForward=true) or less than (when using indexForward=false) record id of 100 are returned. The return result does not include record with id of 100.
  2. if since is not present via request params then the system will assume newest record id as since
  3. Results are always sorted in descending order which means first record being newest record in the list

Limitations

Below are some limitations in the current fund transfer history API:

  1. For recent crypto deposits no detail is returned via this API (e.g. address and txId are null).
  2. For crypto withdrawals only the address field is returned.

Our engineering team will try to address above limitations in the near future.

Get deposit address - Updated 05/22/19

path: /v2/fundtransfer/deposit/address/{currency}

http GET

This API will generate deposit address for the given currency. It works the same as the website (e.g. for XRP currency a destination tag is added).

Sample response:

{"success":true,"errorCode":null,"errorMessage":null,"address":"rU7xJs7QmjbiyxpEozNYUFQxaRD5kueY7z?dt=100000001","currency":"XRP"}
{"success":true,"errorCode":null,"errorMessage":null,"address":"328F3by3VH1wRMjLnWW1bemy8tfMMs4KMu","currency":"BTC"}

Get withdrawal fee - Updated 05/22/19

path: /v2/fundtransfer/withdrawal/fee/{currency}

http GET

This API retrieves withdrawal fee for a currency. (note: it's an authenticated API)

Sample response:

{"success":true,"errorCode":null,"errorMessage":null,"fee":10000,"currency":"BTC"}

Get fund transfer by id - Updated 05/25/19

path: /v2/fundtransfer/detail/123

http GET

This API returns detail of a fund transfer:

Sample response:

{"success":true,"errorCode":null,"errorMessage":null,"fundtransfer":{"status":"Complete","fundTransferId":22531,"description":"XRP withdraw from [me@abc.net] to Address: rU7xxpEozNYUFQxaRD5kueY7z?dt=100000001 amount: 25.00000000 fee: 0.00000000","creationTime":1550603737386,"currency":"XRP","amount":2500000000,"fee":0,"transferType":"WITHDRAW","errorMessage":null,"lastUpdate":1550603819337,"cryptoPaymentDetail":{"address":"rU7xxpEozNYUFQxaRD5kueY7z?dt=100000001","txId":"xrp txid"}}}

Get withdrawal limits - Updated 08/06/19

path: /v2/fundtransfer/withdrawal/limits

http GET

This API returns daily withdrawal limits per currency and also aggregate daily limits and used amounts.

Sample response:

{"success":true,"errorCode":null,"errorMessage":null,"dailyLimits":[{"currency":"BAT","remaining":14585764294049},{"currency":"BCHABC","remaining":9708737864},{"currency":"BCHSV","remaining":21740075655},{"currency":"BTC","remaining":287852619},{"currency":"ENJ","remaining":23685457129322},{"currency":"ETC","remaining":549450549450},{"currency":"ETH","remaining":14617745943},{"currency":"GNT","remaining":54229934924078},{"currency":"LTC","remaining":35564407141},{"currency":"OMG","remaining":2192117146740},{"currency":"POWR","remaining":47125353440150},{"currency":"XLM","remaining":39777247414478},{"currency":"XRP","remaining":10546298249314}],"totalDailyLimits":[{"type":"AUD","limit":800000000000,"used":0,"remaining":800000000000},{"type":"Crypto","limit":5000000000000,"used":0,"remaining":5000000000000}]}

Note: in above example, totalDailyLimits for AUD represents the total amount of $8000 that can be withdrawn in a single day and remaining represents how much is left from $8000. This total daily limit can be consumed by any single or multiple crypto currencies listed in the response. The total limit per currency is calculated as the last price of that currency in AUD multiplied by total daily limit. For instance in above example the user can request to withdraw total of ETH 146.17745943 in a single day, given $8000 daily limit.

Withdraw crypto or fiat - Updated 08/08/19

path: /v2/fundtransfer/withdrawal

http POST

For fiat the following inout params are mandatory:

  • currency
  • amount Sample input:
{"amount":500000000,"currency":"AUD"}

sample output:

{"success":true,"errorCode":null,"errorMessage":null,"status":"Pending Authorization","fundTransferId":7072539,"description":"Withdraw from [john.smith@abc.co] to ibank, 123(BSB: 123456, Account: 123456)","creationTime":1565290582058,"currency":"AUD","amount":500000000,"fee":0}

with above parameters, our system will use your default bank account already saved (first time you requested to withdraw on our website)

Optionally you can also provide below additional parameters:

  • accountNumber
  • accountName
  • bsbNumber
  • bankName (it's mandatory but free text representing the name of your bank.)

The same API can be used to request crypto withdrawal Sample input:

{"amount":500000,"currency":"BTC","address":"your crypto address here"}