Chat

Trollbox
Users Online: 1186

Public API


sa_ddam213
Gender: Male
Country: New Zealand
Threads: 18, Posts: 96
#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: 1, Posts: 12
#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: Male
Country: Ukraine
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: Male
Country: Canada
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: 10
#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: 7
#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: 4
#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: Male
Country: New Zealand
Threads: 18, Posts: 96
#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: 4
#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