{
"Success" : "true"
"Error" : null,
"Data" : "Sucessfull Request Data"
}
Request Methods:
{
"Success":true,
"Error":null,
"Data":[
{
"CurrencyId":1,
"Symbol":"BTC",
"Total":"10300",
"Available":"6700.00000000",
"Unconfirmed":"2.00000000",
"HeldForTrades":"3400,00000000",
"PendingWithdraw":"200.00000000",
"Address":"4HMjBARzTNdUpXCYkZDTHq8vmJQkdxXyFg",
"BaseAddress": "ZDTHq8vmJQkdxXyFgZDTHq8vmJQkdxXyFgZDTHq8vmJQkdxXyFg",
"Status":"OK",
"StatusMessage":""
},
{
...
}
]
}
{
"Success":true,
"Error":null,
"Data":
{
"Currency": "DOT",
"Address":"4HMjBARzTNdUpXCYkZDTHq8vmJQkdxXyFg",
"BaseAddress": "ZDTHq8vmJQkdxXyFgZDTHq8vmJQkdxXyFgZDTHq8vmJQkdxXyFg"
}
}
{
"Success":true,
"Error":null,
"Data":[
{
"OrderId": 23467,
"TradePairId": 100,
"Market": "DOT/BTC",
"Type": "Buy",
"Rate": 0.00000034,
"Amount": 145.98000000,
"Total": "0.00004963",
"Remaining": "23.98760000",
"TimeStamp":"2014-12-07T20:04:05.3947572"
},
{
...........
}
]
}
{
"Success":true,
"Error":null,
"Data":[
{
"TradeId": 23467,
"TradePairId": 100,
"Market": "DOT/BTC",
"Type": "Buy",
"Rate": 0.00000034,
"Amount": 145.98000000,
"Total": "0.00004963",
"Fee": "0.98760000",
"TimeStamp":"2014-12-07T20:04:05.3947572"
},
{
...........
}
]
}
{
"Success":true,
"Error":null,
"Data":[
{
"Id": 23467,
"Currency": "DOT",
"TxId": "6ddbaca454c97ba4e8a87a1cb49fa5ceace80b89eaced84b46a8f52c2b8c8ca3",
"Type": "Deposit",
"Amount": 145.98000000,
"Fee": "0.00000000",
"Status": "Confirmed",
"Confirmations": "20",
"TimeStamp":"2014-12-07T20:04:05.3947572",
"Address": ""
},
{
"Id": 23467,
"Currency": "DOT",
"TxId": "9281eacaad58335b884adc24be884c00200a4fc17b2e05c72e255976223de187",
"Type": "Withdraw",
"Amount": 1000.00000000,
"Fee": "0.00004000",
"Status": "Pending",
"Confirmations": "20",
"TimeStamp":"2014-12-07T20:04:05.3947572",
"Address": "15wPaAegfKai51KK2yemgLP5vEg5UWzSkC"
}
]
}
{
"Success":true,
"Error":null,
"Data":
{
"OrderId": 23467,
"FilledOrders": [44310,44311]
}
}
{
"Success":true,
"Error":null,
"Data": [44310,44311]
}
{
"Success":true,
"Error":null,
"Data": "You tipped 45 users 0.00034500 DOT each."
}
{
"Success":true,
"Error":null,
"Data": 405667
}
{
"Success":true,
"Error":null,
"Data": "Successfully transfered 200 DOT to Hex."
}
Hey guys,
Do you have plans to allow users to have several API keys? That would allow for different permissions, and for running several scripts on the same account without risking nonce conflicts.
Hi there,
I was trying to get my api key to use it on coinigy but it is not that intuitive to get it on Cryptopia, could you give my a hand, please?
Thanks for your time!!
T
Hello,
After successfully logging in, move your cursor over your username in the upper right corner, and click on "Settings" in the appearing menu.
In the settings menu, click on the link "Security" on the left side of the screen.
In section "Account security", you find the API settings. Check the box "Enable API" - et voilà.
hth
thebner: 6/8/2017 9:39:54 PMHello,
After successfully logging in, move your cursor over your username in the upper right corner, and click on "Settings" in the appearing menu.
In the settings menu, click on the link "Security" on the left side of the screen.
In section "Account security", you find the API settings. Check the box "Enable API" - et voilà.
hth
Hi All,
Even I am facing the same issue, I've generated new API key and secret, enabled API but not able to get balances, it is showing message as bad request with status 401
Please add the feature to receive all GetBalance where Total != 0
Keep up the good work.
Is there any plan to make a getOrderStatus with OrderID as input that could show much is filled?
I just put through an order, and it said filled 0 but success=true
Then I checked my trade history and it wasn't there, and checked open trades and it wasn't there...
I tried to find a way to look up the orderid but I couldn't find a way...
Hi, how to get specific order id info? There is no such thing in API to get?
What happened to the encoding in response to json?
Private api responds to me: ܛ�s�H����\�� b�QT~(r��0*�u��
So you have a call to get the balance of a currency.
But do you have a call to get all the coins with currency > 0 ?
NVShad: 7/16/2017 7:41:12 PMWhat happened to the encoding in response to json?
Private api responds to me: ܛ�s�H����\�� b�QT~(r��0*�u��
Hey, I'm finally almost finished my first private example, took me two weeks to get the authentication right! lol.
I decode my HTTP response with UTF-8-SIG. Luckily Python hinted at the encoding for me so I wasn't left with the garbage you printed :P
All of the other questions, IMHO are outside of the scope of an API.
This API is giving you the means to probe all data available.
It's up to you as a programmer to handle that data properly.
For the non-zero balances, store your wallets in an iterable and cycle through checking that their balance > 0, job done.
For User Access and Control, code up the single use API then build a frontend that gives people limited access, job done.
For specific orderID, again store the open orders in an interable and cycle til you find your order ID, job done.
Hi All,
I am using PHP integration of API. But I don't find any status of the order either in trade history and open orders. Is there any option to find the order id in the trade history.
I recently tested the tip function and although it functions, I'm noticing the Data field is returning None type instead of the confirmation string advertised.
I've already put a Null test in my response code, just wondering if it's normal to receive the null response?
diliptrident: 7/18/2017 1:18:41 PMHi All,
I am using PHP integration of API. But I don't find any status of the order either in trade history and open orders. Is there any option to find the order id in the trade history.
Hey, the list returned from the API should give you these variables:
Open Orders: "OrderId"
Past Trades: "TradeId"
Past Transactions: "Id" ("TxId" is also offered, but I suspect this is the blockchain TxId)
As for finding the status, as I understand it:
An order is an unfilled, open order. It has a "Remaining" variable which will tell you how much is left to trade.
If this equals the "Amount" variable then the order is 0% completed, it approaches 100% as "Remaining" reaches 0
A Trade is a filled order, there is no order ID for it, however with a bit of clever programming you can keep track of the filled
"TradeId"s and compare them to the "Remaining" balance on the Open Orders for that TradePair, although totting those up
should only equate to the "Remaining" amount anyway so not a lot of point there.
Hope that's helped a bit, if you're experiencing problems using the API code examples you may need to post in there. I had to
butcher the two python examples and still spent a fortnight scratching my noodle.
Hi, there is socket version of API?
Any help is accepted.
Thank's
I want to sell all my coins and buy for it coin XYZ.
What API string do I need for this?
Can anybody help me with this? I am too confused to figure this out :(
For the non-zero balances, store your wallets in an iterable and cycle through checking that their balance > 0, job done.
The problem is .. it's soooooo slow and not efficient. Because I tried this method before posting this question. I'm not going to store my wallets on my system. So I have to get ALL the currencies (thats 1 api call), then I have to cycle through each currency (that's for each currency 1 api call).
It would help if you guys just could make a function to give us at least de currencies we(the user) came in contact with. Now that list is way much shorter than ALL the currencies to cycle through to check if balance > 0.
So for example .. I've never had a wallet for https://www.cryptopia.co.nz/Exchange?market=42_BTC , because I've never traded with the 42 coin, so I don't need that call to check it's balance.
So I have to get ALL the currencies (thats 1 api call), then I have to cycle through each currency (that's for each currency 1 api call).
I'm not sure why you would have to use more than one API call?
I make one API call to /GetBalance/ params: Currency = "" and it returns me a full list of wallets with all variables inside. I then iterate that list object and snatch each item.
Whilst I'm at it, I check the total and make a note.
total = balance["Total"]
if total > 0:
inonzero = inonzero + 1
In my case I currently only count the non zero wallets and report it to the user, but inside that if statement, you could easily make a list of the currencies to recall from objects stored in memory from that first single API call.
I trade plenty of coins that on any given day I might end on a zero total, I wouldn't want to miss these. The alternative would be extra parameters but I'm confident the API returns what you are asking in just one API call.
The only current situation I find that behaves the way you describe is the GetDepositAddress which even though I've generated the address on the website GetBalance doesn't return it and I need to make the second API call to get the wallet address for each coin.
I make one API call to /GetBalance/ params: Currency = "" and it returns me a full list of wallets with all variables inside. I then iterate that list object and snatch each item.
aaah wait .. I thought currency was required and not optional .. I didn't realised that. That's why I first got all the currencies and then did a getbalance .. sorry my bad
yocoin: 7/25/2017 5:18:36 PMI make one API call to /GetBalance/ params: Currency = "" and it returns me a full list of wallets with all variables inside. I then iterate that list object and snatch each item.
aaah wait .. I thought currency was required and not optional .. I didn't realised that. That's why I first got all the currencies and then did a getbalance .. sorry my bad
Glad it helped, looking back it does say, both are optional but at the end in brackets it says if the other is provided, I must have just been chancing my luck by sending it nothing.
I guess I'm lucky it worked.
Anyone can give a way to start ?
i am a newbie at php and i do not find any hint to that type of authentication .
nicolasgleiser: 7/27/2017 9:38:14 PMAnyone can give a way to start ?
i am a newbie at php and i do not find any hint to that type of authentication .
What do you mean?
If you want you can use my API framework to connect to Cryptopia :
https://github.com/fransyozef/cryptofyer
Al_z: 7/17/2017 6:43:04 PMNVShad: 7/16/2017 7:41:12 PMWhat happened to the encoding in response to json?
Private api responds to me: ܛ�s�H����\�� b�QT~(r��0*�u��
Hey, I'm finally almost finished my first private example, took me two weeks to get the authentication right! lol.
I decode my HTTP response with UTF-8-SIG. Luckily Python hinted at the encoding for me so I wasn't left with the garbage you printed :P
Did you plan to post the python examples somewhere? (ie: github)
GetBalanceReturns all balances or a specific currency balance
The link under this text is https://www.cryptopia.co.nz/api/GetCurrencies ;)