Coinfloor offers an API gateway that approximately emulates Bitstamp's v1 HTTP API. This document details the differences, the most notable of which are related to Coinfloor's use of different currency codes.
Bitstamp was not a multi-currency exchange at the time this emulation layer was implemented. Because Coinfloor is a multi-currency exchange, Coinfloor emulates the entire Bitstamp v1 API at multiple separate endpoints, one for each market that Coinfloor operates.
The Bitstamp-like API can be accessed at the following API endpoints:
https://webapi.coinfloor.co.uk/bist/<base>/<counter>/
<base>
and <counter>
are placeholders for asset codes listed in the "Asset Type" column of SCALE.md.
These endpoint URIs replace the https://www.bitstamp.net/api/
portion of Bitstamp's URIs.
None.
- Bitstamp includes an undocumented
timestamp
field in the returned JSON object. Coinfloor does not include this field. Please refer to theDate
HTTP response header. - Coinfloor returns null for any ticker fields that are not populated, as may happen if no trade has occurred in the past 24 hours.
None.
- Bitstamp includes an undocumented
timestamp
field in the returned JSON object. Coinfloor does not include this field. Please refer to theDate
HTTP response header.
None.
- Bitstamp encodes the
date
field as a string, even though its value is a Unix timestamp. Coinfloor encodes thedate
field as an integer.
Coinfloor does not implement this method.
- Bitstamp authenticates requests using an API key and an HMAC (which Bitstamp calls a "signature"). The HMAC is computed using a tonce (which Bitstamp calls a "nonce," even though it isn't one), a client ID, an API key, and a secret key as inputs. The API key, tonce, and HMAC are then passed as POST parameters.
- Coinfloor authenticates requests using standard HTTP Basic authentication. The username portion of the Basic credentials is constructed by concatenating the numeric user ID, a slash, and the user's API authentication cookie. The password portion is simply the user's login passphrase.
- Bitstamp passes authentication credentials in POST parameters. Custom software is needed to generate the required HMAC.
- Coinfloor passes authentication credentials in the HTTP standard
Authorization
request header. Many off-the-shelf HTTP clients (including cURL and all web browsers) can generate the necessary request header.
- Coinfloor does not return information about trading fees.
- Bitstamp returns fields whose names are constructed by appending
_balance
,_reserved
, or_available
to a currency code, which is eitherbtc
orusd
. Coinfloor constructs these field names using currency codesxbt
,eur
,gbp
,usd
, and/orpln
, depending on the specific API endpoint being accessed. - Coinfloor does not include the
fee
field in the response.
None.
- Bitstamp returns the quantity and total of each trade in the
btc
andusd
fields, respectively, and returns the trade price in the (undocumented)btc_usd
field. Coinfloor names these fields using currency codesxbt
,eur
,gbp
,usd
, and/orpln
, depending on the specific API endpoint being accessed.
None.
None.
None.
- If the specified order could not be found, Bitstamp returns
{"error": "Order not found"}
. Coinfloor returnsfalse
in this case. - If the specified order was found and canceled, Bitstamp returns
true
with aContent-Type: application/json
header, even thoughtrue
is not a valid JSON encoding. Coinfloor returnstrue
with aContent-Type: text/plain
header in this case.
- Coinfloor supports the use of tonces on orders via the optional
nonce
request parameter (so named to emulate Bitstamp). When tonces are used, each order placed must specify a tonce that is greater than that specified on any previous order since the tonce counter was last reset. Placing an order without a tonce resets the tonce counter. - Coinfloor supports an optional time-to-live parameter on orders. If given, the placed order will be canceled automatically after the specified time if it has not already been closed otherwise.
- Note that extenuating circumstances (such as heavy traffic or system upgrades) may force orders placed with times-to-live to be canceled sooner than specified. (This proviso does not apply to orders placed without a time-to-live.)
- Bitstamp returns a
datetime
field with microsecond precision. Coinfloor returns adatetime
field with whole-second precision. - Coinfloor accepts an optional
ttl
request parameter that specifies a time-to-live for the order in seconds. If given, it must be positive and must not exceed 86400 (24 hours).
Bitstamp does not implement this method.
POST <endpoint>/buy_market/
POST <endpoint>/sell_market/
- Exactly one of:
quantity
– an amount of the base asset to buy or selltotal
– an amount of the counter asset with which to buy the base asset or for which to sell the base asset
Returns a JSON object containing a single field remaining
, which communicates how much of the requested quantity or total could not be traded.
Bitstamp does not implement this method.
POST <endpoint>/estimate_buy_market/
POST <endpoint>/estimate_sell_market/
- Exactly one of:
quantity
– an amount of the base asset that would be bought or soldtotal
– an amount of the counter asset with which the base asset would be bought or for which the base asset would be sold
Returns a JSON object containing fields quantity
and total
, which reflect how much of the base and counter assets, respectively, would have been traded if a market order had been executed.
Coinfloor does not implement this method.
- Coinfloor does not support withdrawing bitcoins to arbitrary Bitcoin addresses. All withdrawals are made to the address on file for the requesting user.
- Coinfloor does not support the
address
parameter and will reject any request that specifies it. - Coinfloor does not return a withdrawal identifier. A successful call returns a
204 No Content
status.
Coinfloor does not implement this method.
Coinfloor does not implement this method.
Coinfloor does not implement this method.
Coinfloor does not implement this method.