Example API clients Below are sample API client code libraries that can be used when writing your own API client.
Learn about our API
NOTE: All API URLs should use the domain api.losbreken.com.
Public methods can use either GET or Postbode.
Private methods voorwaarde use Postbode and be set up spil goes after:
Note: There is no way to reset the nonce to a lower value so be sure to use a nonce generation method that won’t generate numbers less than the previous nonce. A persistent tegenstoot or the current time ter hundredths of a 2nd precision or higher is suggested. Too many requests with nonces below the last valid nonce (EAPI:Invalid nonce) can result ter improvised bans.
Note: Sometimes requests can arrive out of order or NTP can cause your clock to rewind, resulting ter nonce issues. If you encounter this kwestie, you can switch the nonce window ter your account API settings pagina. The amount to set it to depends upon how you increment the nonce. Depending on your connectivity, a setting that would accomodate 3-15 seconds of network issues is suggested.
API calls that require currency assets can be referenced using their ISO4217-A3 names ter the case of ISO registered names, their Trio letterteken commonly used names ter the case of unregistered names, or their X-ISO4217-A3 code (see http://www.ifex-project.org/).
Responses are JSON encoded ter the form of:
Note: Care should be taken when treating any numbers represented spil strings, spil thesis may overflow standard gegevens types.
API call rate limit
Wij have safeguards ter place to protect against manhandle/DoS attacks spil well spil order book manipulation caused by the rapid placing and canceling of orders.
Every user of our API has a ",call tegenstoot", which starts at 0.
Ledger/trade history calls increase the tegenstoot by Two.
Place/parasol order calls do not affect the tegenstoot.
All other API calls increase the tegenstoot by 1.
The user’s tegenstoot is diminished every duo of seconds, and if the tegenstoot exceeds the user’s maximum API access is suspended for 15 minutes. Tier Two users have a maximum of 15 and their count gets diminished by 1 every Trio seconds. Tier Trio and Four users have a maximum of 20, the count is diminished by 1 every Two seconds for tier Trio users, and is diminished by 1 every 1 2nd for tier Four users.
Albeit placing and cancelling orders does not increase the tegenstoot, there are separate thresholds te place to prevent order book manipulation. Only placing orders you intend to pack and keeping the rate down to 1 vanaf 2nd is generally enough to not kasstuk this limit.
Public market gegevens
Get server time
Result: Server’s time
Note: This is to aid te approximating the skew time inbetween the server and client.
Get asset informatie
Result: array of asset names and their informatie
Get tradable asset pairs
Result: array of pair names and their informatie
Note: If an asset pair is on a maker/taker toverfee schedule, the taker side is given ter “fees” and maker side te “fees_maker”. For pairs not on maker/taker, they will only be given te “fees”.
Get ticker information
Result: array of pair names and their ticker informatie
Note: Today’s prices commence at 00:00:00 UTC
Get OHLC gegevens
Result: array of pair name and OHLC gegevens
Note: the last entry ter the OHLC array is for the current, not-yet-committed framework and will always be present, regardless of the value of ",since",.
Get order book
Result: array of pair name and market depth
Get latest trades
Result: array of pair name and latest trade gegevens
Get latest spread gegevens
Result: array of pair name and latest spread gegevens
Note: ",since", is inclusive so any returned gegevens with the same time spil the previous set should overwrite all of the previous set’s entries at that time
Private user gegevens
Get account cálculo
Result: array of asset names and arqueo amount
Get trade arqueo
Result: array of trade movimiento informatie
Note: Rates used for the floating valuation is the midpoint of the best bid and ask prices
Get open orders
Result: array of order informatie te open array with txid spil the key
Note: Unless otherwise stated, costs, fees, prices, and volumes are ter the asset pair’s scale, not the currency’s scale. For example, if the asset pair uses a loterijlot size that has a scale of 8, the volume will use a scale of 8, even if the currency it represents only has a scale of Two. Similarly, if the asset pair’s pricing scale is Five, the scale will remain spil Five, even if the underlying currency has a scale of 8.
Get closed orders
Result: array of order informatie
Note: Times given by order tx ids are more accurate than unix timestamps. If an order tx id is given for the time, the order’s open time is used
Query orders informatie
Result: associative array of orders informatie
Get trades history
Result: array of trade informatie
If the trade opened a position, the go after fields are also present te the trade informatie:
- Unless otherwise stated, costs, fees, prices, and volumes are te the asset pair’s scale, not the currency’s scale.
- Times given by trade tx ids are more accurate than unix timestamps.
Query trades informatie
Result: associative array of trades informatie
Get open positions
Result: associative array of open position informatie
Note: Unless otherwise stated, costs, fees, prices, and volumes are ter the asset pair’s scale, not the currency’s scale.
Get ledgers informatie
Result: associative array of ledgers informatie
Note: Times given by ledger ids are more accurate than unix timestamps.
Result: associative array of ledgers informatie
Get trade volume
Result: associative array
Note: If an asset pair is on a maker/taker toverfee schedule, the taker side is given te “fees” and maker side ter “fees_maker”. For pairs not on maker/taker, they will only be given ter “fees”.
Private user trading
Add standard order
Errors: errors include (but are not limited to):
- See Get tradable asset pairs for specifications on asset pair prices, lots, and leverage.
- Prices can be preceded by +, -, or # to represent the price spil a relative amount (with the exception of trailing stops, which are always relative). + adds the amount to the current suggested price. – subtracts the amount from the current suggested price. # will either add or subtract the amount to the current suggested price, depending on the type and order type used. Relative prices can be suffixed with a % to represent the relative amount spil a percentage of the suggested price.
- For orders using leverage, 0 can be used for the volume to auto-fill the volume needed to close out your position.
- If you receive the error “EOrder:Trading agreement required”, refer to your API key management pagina for further details.
Pantalla open order
Note: txid may be a user reference id.
Example API clients
Below are sample API client code libraries that can be used when writing your own API client. Please keep te mind that Payward strafgevangenis the third party authors are responsible for losses due to bugs or improper use of the APIs. Payward has performed an initial review of the safety of the third party code before listing them but cannot vouch for any switches added since then. If you have concerns, please voeling support.