Chat

Trollbox
Users Online: 0

Public API


sa_ddam213
Gender: Unknown
Country: Unknown
Threads: 18, Posts: 99
#0

Public API


 

GetCurrencies
Returns all currency data
{
    "Success":true,
    "Message":null,
    "Data":[
            {
                "Id":1,
                "Name":"Bitcoin",
                "Symbol":"BTC",
                "Algorithm":"sha256"
"WithdrawFee":0.00010000,
"MinWithdraw":0.00040000,
"MinBaseTrade":0.0,
"IsTipEnabled":false,
"MinTip":0.0,
"DepositConfirmations":6,
"Status":"Maintenance",
"StatusMessage":"Unable to sync network",
"ListingStatus": "Active" }, { ... } ] }

 

GetTradePairs
Returns all trade pair data
{
    "Success":true,
    "Message":null,
    "Data":[{
                "Id":104,
                "Label":"LTC/BTC",
                "Currency":"Litecoin",
                "Symbol":"LTC",
                "BaseCurrency":"Bitcoin",
                "BaseSymbol":"BTC",
                "Status":"OK",
                "StatusMessage":"",
                "TradeFee":"0.20000000",
                "MinimumTrade":"0.00000001,
                "MaximumTrade":"1000000000.00000000",
                "MinimumBaseTrade":"0.00000500",
                "MaximumBaseTrade":"1000000000.00000000",
                "MinimumPrice":"0.00000001",
                "MaximumPrice":"1000000000.00000000" }, { ... }] }

 

GetMarkets
Returns all market data
Param: baseMarket (optional, default: All)
Param: hours (optional, default: 24)
{
    "Success":true,
    "Message":null,
    "Data":[{
                "TradePairId":100,
                "Label":"LTC/BTC",
                "AskPrice":0.00006000,
                "BidPrice":0.02000000,
                "Low":0.00006000,
                "High":0.00006000,
                "Volume":1000.05639978,
                "LastPrice":0.00006000,
                "BuyVolume":34455.678,
                "SellVolume":67003436.37658233,
                "Change":-400.00000000,
  "Open": 0.00000500,
                "Close": 0.00000600,
                "BaseVolume": 3.58675866,
                "BaseBuyVolume": 11.25364758,
"BaseSellVolume": 3456.06746543 }, { ... }] }

 

GetMarket
Returns market data for the specified trade pair
Param: market (Required) (TradePairId or MarketName)
Param: hours (optional, default: 24)
{
    "Success":true,
    "Message":null,
    "Data":{
                "TradePairId":100,
                "Label":"LTC/BTC",
                "AskPrice":0.00006000,
                "BidPrice":0.02000000,
                "Low":0.00006000,
                "High":0.00006000,
                "Volume":1000.05639978,
                "LastPrice":0.00006000,
                "BuyVolume":67003436.37658233,
                "SellVolume":67003436.37658233,
                "Change":-400.00000000,
"Open": 0.00000500,
"Close": 0.00000600,
"BaseVolume": 3.58675866,
"BaseBuyVolume": 11.25364758,
"BaseSellVolume": 3456.06746543 } }

 

GetMarketHistory
Returns the market history data for the specified tarde pair.
Param: market (Required) (TradePairId or MarketName)
Param: hours (optional, default: 24)
Param
{ "Success":true, "Message":null, "Data":[{ "TradePairId":100, "Label":"LTC/BTC", "Type":"Sell", "Price":0.00006000, "Amount":499.99640000, "Total":0.02999978, "Timestamp": 1418297368 }, { .... }] }

 

GetMarketOrders
Returns the open buy and sell orders for the specified tarde pair.
Param: market (Required) (TradePairId or MarketName)
Param: orderCount (optional, default: 100)
{
    "Success":true,
    "Message":null,
    "Data":{
            "Buy":[{
                        "TradePairId":100,
                        "Label":"LTC/BTC",
                        "Price":0.00006000,
                        "Volume":455055.00360000,
                        "Total":27.303300
                   },
                   { 
                      ...
                   }],
            "Sell":[{
                        "TradePairId":100,
                        "Label":"LTC/BTC",
                        "Price":0.02000000,
                        "Volume":499.99640000,
                        "Total":9.999928
                    },
                    { 
                       ...
                    }],
            }
}
        



GetMarketOrderGroups
Returns the open buy and sell orders for the specified markets.
Param: markets (Required) (TradePairIds or MarketNames seperated by '-')
Param: orderCount (optional, default: 100)
{
    "Success":true,
    "Message":null,
    "Data":{[{
"TradePairId": 100,
"Market": "LTC_BTC" "Buy":[orders...], "Sell":[orders...] },
{
      "TradePairId": 101,
    "Market": "DOT_BTC"
            "Buy":[orders...],
            "Sell":[orders...],
            },
     {
      "TradePairId": 102,
    "Market": "DOGE_BTC"
            "Buy":[orders...],
                "Sell":[orders...],
             }
} }

 



Posted: 9/7/2015 5:02:01 AM Edited: 5/25/2017 8:57:40 AM
porutchik
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#1

time for refresh? Is it good to get in 1/5/15 minutes or more?



Posted: 7/5/2016 7:54:28 AM
Spidersbox
Gender: Unknown
Country: Unknown
Threads: 2, Posts: 13
#2

Is there an API for wallet information like height ,difficulty, hash rate, money supply etc. ?



Posted: 7/18/2016 11:04:42 PM
MineCoins
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#3

Hello, you can make API you offer much easier to use (CORS) if you add Access-Control-Allow-Origin: * Header to HTTP reply.

 

it's definitely not what a programmer expects to see. Please add

Access-Control-Allow-Origin: *

to reply header. This missing header entry makes API almost unusable in some cases (javascript).



Posted: 12/3/2016 10:42:29 AM Edited: 12/3/2016 8:04:54 PM
cryptomaxsun
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#4

Please tell me - how to add currency using api to their pool?
What do I need?



Posted: 12/4/2016 6:55:36 PM
dnp
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#5

would be cool to have a public mining info api.

one that returns a given coin's hash algorithms supported, the network difficulty for each algorithm,

true/false on proof-of-stake supported (possibly its difficulty), the current cryptopia hashing rate,

pool stats (block number, shares submitted on block, number of miners, estimated shares needed, etc.)

 

 



Posted: 12/20/2016 5:51:24 PM
elbandi
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#6

+1 for mining api



Posted: 12/30/2016 1:37:05 PM
rsfinance
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#7

Is there an API for wallet information like height ,difficulty, hash rate, money supply etc. ?

Spidersbox: 7/18/2016 11:04:42 PM

one that returns a given coin's hash algorithms supported, the network difficulty for each algorithm,

true/false on proof-of-stake supported (possibly its difficulty), the current cryptopia hashing rate,

pool stats (block number, shares submitted on block, number of miners, estimated shares needed, etc.) 

dnp: 12/20/2016 5:51:24 PM

 

 

The CoinMarketCap.com API has most of this info and updates every 5 min.

http://coinmarketcap.com/api/

 

If you need more detailed info you can use the CryptoCompare.com API that updates every hour.

https://www.cryptocompare.com/api

 



Posted: 1/21/2017 1:15:15 PM
sevenup
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#8

i do it in browser - "https://www.cryptopia.co.nz/api/GetMarketOrders/215/5"  for BTA

 

{"Success":true,"Message":null,"Data":{"Buy":[],"Sell":[]},"Error":null}

 

error ?

 



Posted: 2/22/2017 3:32:01 PM
hakan7punkt
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 16
#9

i do it in browser - "https://www.cryptopia.co.nz/api/GetMarketOrders/215/5"  for BTA

 

{"Success":true,"Message":null,"Data":{"Buy":[],"Sell":[]},"Error":null}

 

error ?

 

sevenup: 2/22/2017 3:32:01 PM

You need to use the trade pair id, ie 2664 for BTA/BTC:

https://www.cryptopia.co.nz/api/GetMarketOrders/2664/5



Posted: 2/22/2017 8:14:51 PM
Etar
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#10

i do it in browser - "https://www.cryptopia.co.nz/api/GetMarketOrders/215/5"  for BTA

 

{"Success":true,"Message":null,"Data":{"Buy":[],"Sell":[]},"Error":null}

 

error ?

 

sevenup: 2/22/2017 3:32:01 PM

You need to use the trade pair id, ie 2664 for BTA/BTC:

https://www.cryptopia.co.nz/api/GetMarketOrders/2664/5

hakan7punkt: 2/22/2017 8:14:51 PM

 Thanks!

I need MUSIC / BTC

Where i can see ID this pair?

Solved, i found 4942

Question.. only https supported to public method?

i need http like in bittrex.. Thanks

use http protocol

send:

GET /api/GetMarket/4942 HTTP/1.1
Host: cryptopia.co.nz
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090624 Firefox/3.5


Receive...
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="https://www.cryptopia.co.nz/api/GetMarket/4942">here</a></body>    

 

How i can use http protocol? ( I can`t use https)..

 

 



Posted: 3/16/2017 8:13:23 AM Edited: 3/16/2017 9:23:27 AM
Switch
Gender: Unknown
Country: Unknown
Threads: 1, Posts: 8
#11

i do it in browser - "https://www.cryptopia.co.nz/api/GetMarketOrders/215/5"  for BTA

 

{"Success":true,"Message":null,"Data":{"Buy":[],"Sell":[]},"Error":null}

 

error ?

 

sevenup: 2/22/2017 3:32:01 PM

You need to use the trade pair id, ie 2664 for BTA/BTC:

https://www.cryptopia.co.nz/api/GetMarketOrders/2664/5

hakan7punkt: 2/22/2017 8:14:51 PM

 Thanks!

I need MUSIC / BTC

Where i can see ID this pair?

Solved, i found 4942

Question.. only https supported to public method?

i need http like in bittrex.. Thanks

use http protocol

send:

GET /api/GetMarket/4942 HTTP/1.1
Host: cryptopia.co.nz
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090624 Firefox/3.5


Receive...
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="https://www.cryptopia.co.nz/api/GetMarket/4942">here</a></body>    

 

How i can use http protocol? ( I can`t use https)..

 

 

Etar: 3/16/2017 8:13:23 AM

 Hi Etar, Still working on the same bug? whats your code look like?



Posted: 4/9/2017 1:18:46 AM
creativ888
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 6
#12

GetMarketOrderGroups seems to be limited at around 28 trade pairs  ( when given in form DOT_BTC-DOT-LTC etc.., not tested with trade pair ids). If we give more we get error 400 or "Bad request"

Is this a bug ?

Will this be changed ?

 

Ps : in the 4 urls given as exemples for GetMarketOrderGroups, only the 1st exemple use GetMarketOrderGroups, the 3 others do link to GetMarketOrders (missing "Groups")

Thanks



Posted: 5/1/2017 11:49:28 PM Edited: 5/1/2017 11:52:43 PM
sa_ddam213
Gender: Unknown
Country: Unknown
Threads: 18, Posts: 99
#13

GetMarketOrderGroups seems to be limited at around 28 trade pairs  ( when given in form DOT_BTC-DOT-LTC etc.., not tested with trade pair ids). If we give more we get error 400 or "Bad request"

Is this a bug ?

Will this be changed ?

 

Ps : in the 4 urls given as exemples for GetMarketOrderGroups, only the 1st exemple use GetMarketOrderGroups, the 3 others do link to GetMarketOrders (missing "Groups")

Thanks

creativ888: 5/1/2017 11:49:28 PM

The issue with long url's has been resolved.

 

I have updated the links in the documentation :)



Posted: 5/2/2017 11:24:37 AM Edited: 5/2/2017 11:25:09 AM
creativ888
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 6
#14

 

The issue with long url's has been resolved.

I have updated the links in the documentation :)

sa_ddam213: 5/2/2017 11:24:37 AM

Wow, fast reaction :)

Yes! indeed it works now. Thank you!



Posted: 5/6/2017 2:04:34 AM Edited: 5/6/2017 2:14:51 AM
Benzoate2000
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#15

"Last Volume" column is not available on GetMarket(s) any more. Is this intended?

 

 

>>>

Definition:

GetMarket
Returns market data for the specified trade pair
Param: market (Required) (TradePairId or MarketName)
Param: hours (optional, default: 24)
{
    "Success":true,
    "Message":null,
    "Data":{
                "TradePairId":100,
                "Label":"LTC/BTC",
                "AskPrice":0.00006000,
                "BidPrice":0.02000000,
                "Low":0.00006000,
                "High":0.00006000,
                "Volume":1000.05639978,
                "LastPrice":0.00006000,
                "LastVolume":499.99640000,  // this one  is missing
                "BuyVolume":67003436.37658233,
                "SellVolume":67003436.37658233,
                "Change":-400.00000000,
"Open": 0.00000500,
"Close": 0.00000600,
"BaseVolume": 3.58675866,
"BaseBuyVolume": 11.25364758,
"BaseSellVolume": 3456.06746543 } }
Actual call returns:

{
"Success":true,
"Message":null,
"Data":
{
"TradePairId":5050,
"Label":"ATMS/BTC",
"AskPrice":0.00000900,
"BidPrice":0.00000858,
"Low":0.00000746,
"High":0.00000900,
"Volume":1675543.32950911,
"LastPrice":0.00000895,
"Last volume used to be here",
"BuyVolume":1332192.40605295,
"SellVolume":856744.61136379,
"Change":-16.65,
"Open":0.00000746,
"Close":0.00000895,
"BaseVolume":13.96177440,
"BuyBaseVolume":6.60509900,
"SellBaseVolume":1663.71259156
},"Error":null}

 



Posted: 5/6/2017 3:41:25 AM Edited: 5/6/2017 3:54:26 AM
pooya87
Gender: Unknown
Country: Unknown
Threads: 1, Posts: 2
#16

The repetition in the data received from the `GetMarketOrders` command is causing a lot of bloat of useless data received. it may not look like much but in fact it accumulates to a lot.

For example: https://www.cryptopia.co.nz/api/GetMarketOrders/DOT_BTC

there is no need for `"TradePairId":100,"Label":"DOT/BTC"` in each order. this can be a JSON key (either with PairID or Label) which has an array of `["Price":..,"Volume":...,"Total":...]` in front of it



Posted: 5/24/2017 5:02:34 PM
Al_z
Gender: Unknown
Country: Unknown
Threads: 1, Posts: 14
#17

[SOLVED! But I'll leave it here in case anyone else is making the same silly mistake! :P ]
[SOLUTION : There is nothing wrong with the API, the market just didn't have any orders since almost a week ago!!]

Hi,  I'm building a desktop interface for the site and I'm having difficulty with GetMarketHistory.

BVC/LTC returns me no market history in my app, I used a debug str to return the marketID 2966 which when I put into the URL:
https://www.cryptopia.co.nz/api/GetMarketHistory/2966/

Returns:

{"Success":true,"Message":null,"Data":[],"Error":null}

 

Even when I add timespan /24 on the end of the URL.



Posted: 6/14/2017 4:12:41 PM Edited: 6/14/2017 4:27:50 PM
creativ888
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 6
#18

The repetition in the data received from the `GetMarketOrders` command is causing a lot of bloat of useless data received. it may not look like much but in fact it accumulates to a lot.

For example: https://www.cryptopia.co.nz/api/GetMarketOrders/DOT_BTC

there is no need for `"TradePairId":100,"Label":"DOT/BTC"` in each order. this can be a JSON key (either with PairID or Label) which has an array of `["Price":..,"Volume":...,"Total":...]` in front of it

pooya87: 5/24/2017 5:02:34 PM

 Totally agree, but I guess it would be difficult to change it now that it has been released (no backward compatibility).



Posted: 6/15/2017 3:12:02 AM
cryptopia91
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#19

Is there any Public API which could tell wallet status?

Like  Online Offline Maintenace or Other Issues.



Posted: 6/22/2017 8:26:10 AM
sa_ddam213
Gender: Unknown
Country: Unknown
Threads: 18, Posts: 99
#20

Is there any Public API which could tell wallet status?

Like  Online Offline Maintenace or Other Issues.

cryptopia91: 6/22/2017 8:26:10 AM

 Yes, its the very first call in the documentation

 

Api/GetCurrencies

"Status":"Maintenance",
"StatusMessage":"Unable to sync network",
"ListingStatus": "Active"



Posted: 6/22/2017 9:53:49 AM Edited: 6/22/2017 9:55:00 AM
nUm81
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#21

Are there issues with the public API after today's down time? I keep getting the following error when trying to query the API with an application that was working up until today;

 

"the server committed a protocol violation. section=responseheader detail=cr must be followed by lf"



Posted: 7/14/2017 1:01:37 PM Edited: 7/14/2017 1:01:51 PM
gmcroman
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#22

Same issue here. It prevents me from updating my excel file.

 This is the error I'm getting:

"The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF"



Posted: 7/16/2017 12:32:50 PM Edited: 7/16/2017 12:33:55 PM
musttradecoins
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#23

Hey there,

I right now trying to get History Data of CHC/BTC (TradeId=2186) via GetMarketHistory like this: "https://www.cryptopia.co.nz/api/GetMarketHistory/2186/48" but it does not exactely work as one expect it to do. I don't get back the Data of the past 48 hours but always get a very limited set of it. It seems that the backend is awlays limits the returing Dataset to a specific time range (max 24 hours). So it does not "honour" the second parameter as the Documentation says. Any ideas whats up here? Is this on purpose to reduce traffic?

Furthermore, if you try to convert the timestamp field to a human readable format via the Chrome Console by typing something like "new Date(1500128185)" (which is a real timestamp value given back) it does convert to "Sun Jan 18 1970 09:42:08 GMT+0100 (W. Europe Standard Time)" which is obv. wrong. So to "fix" this, I had to add "000" to the end of the timestamp like: "new Date(1500128185000)" to actually be converted to the correct date of "Sat Jul 15 2017 16:16:25 GMT+0200 (W. Europe Daylight Time)". Is this expected behavior?

PS: Is there a way to get the trading history of a specific time range of a specific coin? Something like Poloniex supports:

"returnTradeHistory

Returns the past 200 trades for a given market, or up to 50,000 trades between a range specified in UNIX timestamps by the "start" and "end" GET parameters."

That would be great! 

 

Thanks in advance.

JC.



Posted: 7/16/2017 2:16:27 PM Edited: 7/16/2017 2:36:45 PM
Daeamon
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#24

Hello. Create please analog for this

GetMarketHistory api bad alternative((( 



Posted: 7/17/2017 12:11:06 PM