Chat

Trollbox
Users Online: 135
Search Posts

Last Posts
Thread: API

TIMEMACHINE ran well for me, Python 2.7 on Windows 10. I did have to rename to WrapperCryptopia.py I recieved an error that it couldnt be found untill I made that change to the capitalization. If anybody is interested Python+Cryptopia API let me know, I'm just starting to play with it.


Thread: API

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


Thread: API

 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.1Host: cryptopia.co.nzUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1) Gecko/20090624 Firefox/3.5Receive...<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)..    


Thread: API

Hi, as cryptopiaAPI.php doesn't have any function to get all your market history, you can add the following function to do so:    public function markethistory($symbol="")   {      if($symbol=="") {$apiParams=array( 'TradePairId'=>"");} else {$apiParams = array( 'TradePairId'=>$this->getExchangeSymbol($symbol));}      $myOrders = json_decode($this->apiCall("GetTradeHistory", $apiParams), true);      $orders = array();      $price = array();  // sort by price      if( $myOrders['Success'] == "true" && $myOrders['Error'] == "") {         foreach ($myOrders['Data'] as $order) {            $orderSymbol = $this->makeStandardSymbol($order["Market"]); // convert to standard format currency pair            $orders[]=["symbol"=>$orderSymbol,"type"=>$order["Type"],"price"=>$order["Rate"],"amount"=>$order["Amount"],"id"=>$order["TradeId"],"total"=>$order["Total"],"fee"=>$order["Fee"]];            if ($order["Type"] == "Sell") {               $price[] = 0 - $order['Rate'];  // lowest ask price if first            } else {$price[] = $order['Rate'];}         }      } else {throw new Exception("No pude obtener órdenes activas, Error: " . $myOrders['Error'] );}      return $orders;   } Just call the function in your php program something like: $my_history=$ct->markethistory("POTBTC");  


Thread: API

Loaded the program on two separate platforms and it chokes each time on the following line:hmacsignature = base64.b64encode(hmac.new(base64.b64decode( self._PrivateKey ), signature, hashlib.sha256).digest())Throws the following error:2017-03-10 16:05:15 / Interface / Cryptopia: GetBalances I have verified that all the parms going in are correct ( self._PrivateKey and signature)I was able to compare some of the vars to the working PHP version I use for api comms... this command just does not work Yes, I have tried updating the hmac module.No joy. Both machines have an instance of Python 2.7.x  


Thread: API

You need to use the trade pair id, ie 2664 for BTA/BTC: https://www.cryptopia.co.nz/api/GetMarketOrders/2664/5


Thread: API

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


Thread: API

Привет, CoinUser! I am getting following error. Can you give me a hint how to debug or fix it? C:\Python27>python.exe C:\timemashine\timemashine.py --------------------------------------------------------------------------- T I M E M A C H I N EMUIMO advanced auto-sell program for CRYPTOPIA by CoinUser ---------------------------------------------------------------------------2017-02-12 13:59:21 / Interface / Cryptopia: GetBalances / Success: True --------------- Buy : DOGE !! DEMO MODE ACTIVE !! !! DEMO MODE ACTIVE !! --------------- Sell Available StopBalance InputAmount ------ ---------------- ---------------- ---------------- DOT 161.44158913 0.00000000 161.44158913 2017-02-12 13:59:25 / Interface / Cryptopia: GetTradePairs / Success: True searching for possible Trade Routes ... ... found 1 direct Trade(s) ... found 373 Trade Routes across two Markets ... found 3603 Trade Routes across three Markets --------------------------------------------------------------------------- calculating Routes for DOT -> DOGE2017-02-12 13:59:43 / Interface / Cryptopia: GetMarketSummaries / Success: TrueTraceback (most recent call last): File "C:\timemashine\timemashine.py", line 405, in <module> NumProfit.update({count:RouteCheck(Route, Data, AmountToSell)}) File "C:\timemashine\timemashine.py", line 219, in RouteCheck Price = Data['MarketSummaries'][str(element[0][2])]KeyError: '2657'    ------------------------------------------------------------------------------------------------------------------------------------ calculating Routes for DOT -> BTC2017-02-12 15:16:57 / Interface / Cryptopia: GetMarketSummaries / Success: TrueTraceback (most recent call last): File "C:\timemashine\timemashine.py", line 405, in <module> NumProfit.update({count:RouteCheck(Route, Data, AmountToSell)}) File "C:\timemashine\timemashine.py", line 219, in RouteCheck Price = Data['MarketSummaries'][str(element[0][2])]KeyError: '2658' ---------------------------------------------------------------------------


Thread: API

  Found the issue: I had a typo in SuspendedMarkets. Now the script runs.  Nice work!


Thread: API

Hi CoinUser, great tool and work. I am getting following error. Can you give me a hint how to debug or fix it?  


Thread: API

I also want that feature for tracking whehter my order is completely filled or not.  Please include order ID in this API too. All major exchanges poloniex, bittrex, bitfinex, all have these order ID included.


Thread: API

Cryptopia API Wrapper in PHP It includes sample code for each function and a sample buy bot script to keep your buy orders from getting outbid.

- Sample code to call each function in the API wrapper.

- Sample Buy Bot.

Donations are accepted in Monero and BipCoin:

XMR: 49kC7NB3iagZf2T4AhBdL84N9JaugEhvJVJDBEuMEKQSUnrx3xFoDzejpRKiSgX7V1j1im8h8xyRmNXJJSQtBtJS7F25nzs

BIP: bip1WevdQxcaVYr1bRuqEsEqU4vEJ5qFtHsrWANG7hbTYyvTmvTswC8FcX6yAZ2MunWE3Fu1qLpTBVU nf7hDhWpi4BbozDmQJ1  


Thread: API

  The CoinMarketCap.com API has most of this info and updates every 5 min.   If you need more detailed info you can use the CryptoCompare.com API that updates every hour.  


Thread: API

+1 for mining api


Thread: API

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.)    


Thread: API

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


Thread: API

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 to reply header. This missing header entry makes API almost unusable in some cases (javascript).


Thread: API

Hi ! I'm not understand those values "11a" and "11b" in lines :


Thread: API

Hello,  does not return the order number. It is impossible to compare open and closed orders. does not return the orderID too, if the order is immediately executed.  It is possible to include return OrderID in the next version of the API? Best regards