API Guide

Please enable JavaScript in your browser!!! This site doesn't work if JavaScript is disabled!!!
This application programming interface (API) brings you powerful tools to implement a trading platform in a custom software.
Using this API you can get ticker, order book, trades, etc. as well as performing trading operations like make orders, check balance, get history and more.

Ticker

GET https://x-crypto.com/api/ticker/[currency 1]/[currency 2]

Returns the latest ticker data for a currency pair.

Example:

# Request:

https://x-crypto.com/api/ticker/btc/usd

# Response:

{

"high":"294.666",
"low":"283.67641",
"avg":"289.9982103605828",
"vol":"9419.210000000021",
"last":"288.45156",
"buy":"288.45156",
"sell":"286.10361",
"since_last":"1.76516",
"since_24_hour":-0.61744000000004,
"timestamp":1438258221

}

Order Book

GET https://x-crypto.com/api/orderbook/[currency 1]/[currency 2]/[maximum number of orders in the list]

Returns the list of "buy" and "sell" orders for a given currency pair.

The data is sorted by the price. For the "buy" orders: the highest offers are shown first, for the "sell" orders: the lowest offers come first.

Example:

# Request:

https://x-crypto.com/api/orderbook/btc/usd/5

# Response:

{

"timestamp":1438259599,
"pair":"btc_usd",
"bids":[

["288.40219", "0.88"],
["288.10784", "9.91"],
["288.02849", "1.77"],
["287.95670", "0.37"],
["287.01743", "0.47"]

],
"asks":[

["289.10306", "0.89"],
["289.36953", "0.25"],
["289.60542", "14.75"],
["290.03729", "0.14"],
["290.53821", "0.53"]

]

}

Trades

GET https://x-crypto.com/api/trades/[currency 1]/[currency 2]/[maximum number of trades in the list]

or

GET https://x-crypto.com/api/trades/<currency 1>/<currency 2>?since=<transaction id>

Returns a list of most recent trades for the given currency pair.

The data is sorted by the time when the deal has been closed. The last deal is shown first.

Example:

# Request:

https://x-crypto.com/api/trades/btc/usd/5

# Response:

{

"timestamp":1438323181,
"pair":"btc_usd",
"trades":[

{"type":"bid","rate":"287.7739","amount":"0.37","tid":"202381","timestamp":"1438323179"},
{"type":"ask","rate":"283.1801","amount":"0.1","tid":"202380","timestamp":"1438323173"},
{"type":"bid","rate":"287.7603","amount":"0.05","tid":"202214","timestamp":"1438323166"},
{"type":"ask","rate":"282.42402","amount":"0.65","tid":"225786","timestamp":"1438323162"},
{"type":"bid","rate":"283.3902","amount":"1.4","tid":"202159","timestamp":"1438323138"}

]

}

Example 2:

# Request:

https://x-crypto.com/api/trades/btc/usd?since=202214

# Response:

{

"timestamp":1438323181,
"pair":"btc_usd",
"trades":[

{"type":"bid","rate":"287.7739","amount":"0.37","tid":"202381","timestamp":"1438323179"},
{"type":"ask","rate":"283.1801","amount":"0.1","tid":"202380","timestamp":"1438323173"},

]

}

Exchanger Integration (XML format)

GET https://x-crypto.com/api/rates_xml

Returns an XML data which represents the commonly used format used to exchange information about last crypto-currency exchange rates.

Example:

# Request:

https://x-crypto.com/api/rates_xml

# Response:

<rates>

<item>

<from>BTC</from>
<to>PPUSD</to>
<in>1</in>
<out>3924.37</out>
<amount>100</amount>
<tofee>0.1 %</tofee>

</item>

</rates>

Exchanger Integration (Json format)

GET https://x-crypto.com/api/rates_xml?style=json_exchanger

Returns an JSON data which represents the commonly used format used to exchange information about last crypto-currency exchange rates.

Example:

# Request:

https://x-crypto.com/api/rates_xml?style=json_exchanger

# Response:

{

"exchanges":
{

"from":
{
"BTC":
{
"to":
{
"PPUSD":
{
"in": 1.00001,
"out": 3917.42,
"amount": 100,
"in_fee":["%", 0.1]
}
}
}
}

}

}
+