Private API


Regulars
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#75

Hi, 

I got nonce error after server maintenance. 

 

{"Success":false,"Error":"Nonce has already been used for this request."}

 

I've tried to create new API key and it still the same error. Tried to disable/enable. and no luck.

 

Anybody got the same problem with me? Any help would be appreciated.

 

Thanks

spyoff: 1/3/2018 3:22:55 PM

 

 

Maybe duplicate threads like in : https://github.com/brocaar/loraserver/issues/116

 

Each timestamp (millisecond) nonce value can be used only once.

Regulars: 1/4/2018 10:21:10 AM

 

I've tried to change the nonce into millis, nanos, seconds, everything, but the same error shown :(

Thanks for the help anyway

 

Can you log nonce values used? You cannot use same value twice. If you request very intensely by default you get same values.

spyoff: 1/4/2018 5:37:44 PM

 



Posted: 1/4/2018 7:56:56 PM
jdegage
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#76

108510851085



Posted: 1/5/2018 12:09:28 AM
spyoff
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 4
#77

 

Can you log nonce values used? You cannot use same value twice. If you request very intensely by default you get same values.

spyoff: 1/4/2018 5:37:44 PM

 

Regulars: 1/4/2018 7:56:56 PM

 

Hi, I've changed the nonce. 

I even try to setup small script, just to get balance, only run once and it gets the same errors.

The nonce value is different for each execution, based on the seconds I run the script.

I use some python, wrapped the cryptopia API on exchange classes.

 

print(datetime.now().strftime("%H:%M:%S.%f"))

balance = exchange.get_balance(currency='USDT')

print(balance)

print(datetime.now().strftime("%H:%M:%S.%f"))


Posted: 1/5/2018 6:02:39 AM
prateek33
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#78

Hello, I think that the withdraw fee are not filled on the API

 

I get for example this withdraw

 

[0] => stdClass Object
                (
                    [Id] => 000000
                    [Currency] => NLC2
                    [TxId] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    [Type] => Withdraw
                    [Amount] => 64.16150239
                    [Fee] => 0
                    [Status] => Complete
                    [Confirmations] => 0
                    [Timestamp] => 2017-08-25T17:55:47.724745
                    [Address] => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

But in the website I see

Currency Amount Fee Status
NLC2 64,16150239 0,01 Complete

 

Thank You

soloam: 11/7/2017 11:29:23 AM

 

Yes. Even I am getting the fees as 0 from the API



Posted: 1/5/2018 5:56:17 PM
zpool
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#79

I keep getting timeouts on the API. are there problems with it lately?

[2018-01-06 00:07:49] cryptopia: Operation timed out after 30001 milliseconds with 0 bytes received

Thanks



Posted: 1/5/2018 11:09:55 PM
aliraza5270
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#80

What is API ?



Posted: 1/5/2018 11:52:45 PM
acastelli1010
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#81

How do I get my private API key so when I want to transfer funds i can?



Posted: 1/7/2018 11:51:11 PM
sophia12
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#82

hola

 



Posted: 1/9/2018 6:15:16 AM
fccsp1969
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#83

Gentlemen, is there an API for retrieving the deposit history? I really need this information to automate my system.

If so, is it possible to submit the URL and documentation?



Posted: 1/9/2018 1:12:22 PM
k0YhMxSp
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 3
#84

GetTradeHistory: missing an order_id . i cannot pair trade with orderId. Without it, API is useless. To ALL, don't waste of your time to implement this API until they FIX this really basic feature.



Posted: 1/14/2018 11:17:35 AM
kruddler
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 5
#85

Hi,

In the GetBalance call, we can elect to specify a Currency, or not select a currency. Generally speaking, I won't ever know what currencies I need to get balances for. That's why I'm querying. But, the call returns over 500 balances. Most of them will be 0. Could the API please have a parameter in the POST body so that only balances with a value greater than 0 are returned?

Thanks



Posted: 1/15/2018 4:33:09 AM
kruddler
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 5
#86

General Observation/Question - oAuth

 

I'm building an app. It connects to a lot of different APIs. They all seem to have the same structure. Each user gets their own API Key and API Secret. This is not unique to Cryptopia. Nearly all exchange APIs are cut from the same mould. Coinbase is the only one I've come across that is different, and uses oAuth.

Firstly, as app developers, we can't expect our users to go and grab an API key and secret. If I asked a user to do this, promptly navigate to their home screen and delete my app. The current security model of exchange APIs only caters for developers who want to trade with their own account - i.e. algorithic traders and so on. It doesn't cater for apps that want to act on behalf of a given exchange user. Facebook doesn't make each user create an API Key / Secret every time the user wants to use Tinder, or some other facebook connected app. That's what oAuth is for.

Exchanges need to make a shift toward oAuth so that a given app can ask the user for permissions like Read Balance, Transfer Money, Mage Trades, etc. and then act on behalf of the user. Without this, apps are never going to full integrate with exchanges.

So firstly, where are the exchange APIs all cut from? Is there a baseline REST API that all the exchanges use? Is it open source? Is there a repo somewhere? Can we contact them?

Secondly, can Cryptopia please look in to implementing oAuth so that my app can act on user's behalf?

PS: I would have posted somewhere else, but I don't have sufficient priviledges to create threads it seems.



Posted: 1/15/2018 4:42:26 AM
kruddler
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 5
#87

On getting balances I'm getting a garbled string as my return value.

This was my original C# code.

                string json = await response.Content.ReadAsStringAsync();

It actually works perfectly in .NET Core as a console app. I can deserialize the json no problem. I would expect .NET Core to behave exactly the same as UWP, but in UWP I just get garbled characters. I've tried encoding with all the different encodings I can think of UTF8, UTF7, Unicde, ASCII. I am getting the success response in the response message. I tried changing the code to this and it's garbled no matter what I do:

                string json = Encoding.UTF8.GetString(await response.Content.ReadAsByteArrayAsync());

Any ideas? Any chance you guys could test the code I posted in the examples thread in UWP to see what might be going on?

 

Oh man this is really driving me insane!!!! I've tried writing the code on the UWP side and the dependency injecting that native UWP code down to the .NET Standard DLL and the problem is still occurring. There are other people complaining about garbled characters in UWP https://stackoverflow.com/questions/35048398/bad-encoding-when-receiving-response-from-httpclient-in-uwp . If you guys could test on UWP with HttpClient, I would so appreciate it.

OOHHHHH!!!! SNEAKY SNEAKY! You guys are compressing your responses!!! I realized this by looking at the content type in the response. .NET Core automatically realizes this and unzips the text for you. But UWP doesn't.

 This extra code is necessary for UWP:

                var bytes = await response.Content.ReadAsByteArrayAsync();
                var json = Unzip(bytes);

The Unzip method can be found here:

https://stackoverflow.com/questions/7343465/compression-decompression-string-with-c-sharp



Posted: 1/15/2018 5:45:31 AM Edited: 1/15/2018 6:28:21 AM
k0YhMxSp
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 3
#88

Hi guys, do you know anyone if every partail order genereate multiple trades in GetTradeHistory or only one Trade after completely filled ? Thanks



Posted: 1/15/2018 7:55:08 AM
gicoprasico
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#89

Hi. How can we get the order status, AFTER the order is canceled? I noticed there is a significant lag in API call. And it happens that the trade is made durring the cancel call. I would like to check if the order was partially or fully processed during the cancel call. But this is not possibile, as order is not in open orders any more and there is no link between orderid and trades in trade history list. Please, any suggestion! 



Posted: 1/15/2018 10:36:48 AM
gicoprasico
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#90

Cryptopia does not provide an API for querying the status of an order. I am wondering how to know how much an order is filled?

  1. I use the API to place an order, from the returned data orderId is known.
  2. I then use the API to cancel the order with orderId.
  3. It is possible that the order is filled before or during the order cancelation. Now I have no ideas whether it is filled or not. 

One can keep track of the trade history to figure out this. But if I place two orders and cancel then one by one, it is not possible to know whether they are filled or not.

Any ideas?

 

purboo: 11/2/2017 12:45:41 PM

 I have the same problem. Yes it can be filled during the cancelation call. 



Posted: 1/15/2018 10:40:12 AM
Kynuren
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 3
#91

In order to support this horrible API, I have had to do all sorts of manual attempts at matching trades to an order. It's really frustrating.



Posted: 1/18/2018 1:57:32 AM
melentievm
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#92

Please consider adding this headers:

Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Authorization

We want to give ability to our users to not submit api keys to server and load history from browser.

While it can be workarounded with proxy server, CORS protection does not do anything useful here.



Posted: 1/18/2018 6:04:21 PM
moneromkr
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#93

Hello,

is there any possibility / paremeter to submit a buy order on market price?

 

SubmitTrade
Submits a new trade order
URI: https://www.cryptopia.co.nz/api/SubmitTrade

Input:
Market: The market symbol of the trade e.g. 'DOT/BTC' (not required if 'TradePairId' supplied)
TradePairId: The Cryptopia tradepair identifier of trade e.g. '100' (not required if 'Market' supplied)
Type: the type of trade e.g. 'Buy' or 'Sell'
Rate: the rate or price to pay for the coins e.g. 0.00000034
Amount: the amount of coins to buy e.g. 123.00000000

Result Example:
{
"Success":true,
"Error":null,
"Data":
{
"OrderId": 23467,
"FilledOrders": [44310,44311]
}
}



Posted: 1/25/2018 10:03:36 AM
marco_muts
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#94

Hi,

 

Do you have an example of a call with private API for Powershell?

Regards,

Marco



Posted: 1/25/2018 11:42:57 PM
whitfield_diffie
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#95

Is there any way to determine using the API how much of my withdrawal limit I have left at any particular time? Thank you for this API, by the way. Much appreciated.

cryptomattc: 12/17/2017 10:15:49 AM

 

I have this question too.

 

Where is the API that gives you the "you have used $X of your $X NZD daily limit" data shown at the top of the balances page?

 

Even the error message from a failed withdrawal attempt doesn't say how much of the limit remains.  So we have to hammer your servers doing binary search.  Don't you want to reduce the load?



Posted: 1/26/2018 3:20:26 AM
eddie_sims642
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#96

Guys, please take into consideration adding an "order update" method on the API. It will be very helpful for us and it will reduce some traffic on your server, avoiding  cancel order-> new order calls.



Posted: 1/28/2018 9:36:33 AM
sheeshani
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#97

where can I find my API key ?



Posted: 1/29/2018 12:44:03 AM
detonatora
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 1
#98

Is checkbox "Enable API" gives permissions to trade, submit and cancel orders? Or only see the balance?

sheeshani, Settings / Securiity, after entering 2FA code.



Posted: 1/29/2018 10:00:05 PM Edited: 1/29/2018 10:01:14 PM
bitree
Gender: Unknown
Country: Unknown
Threads: 0, Posts: 2
#99

I'm trying to enable API in my account, but the settings are not being saved. After refreshing the page API enable checkbox not set. Did I miss something or it's a bug?



Posted: 1/31/2018 4:05:12 PM