Chat

Trollbox
Users Online: 1135
Search Posts

Last Posts
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


Thread: API

 Hi,thank you for the bug report and sorry for the late reply. I've just edited the script and corrected my mistake.Think it happend due to a last minute change, because i work frequently on the scripts to make them more efficent and to add functionality.Or i did it on purpose, to find out if people are interested in those things :D   Cant remeber... Was away for a while.        Hi. I assume it's not compatible, since some comments use a bit different syntax on python 3.     Hi. Yes, it's a auto selling script. It chooses the best route to sell your selected coins to buy one specific coin, depending on provided market prices and market volume. Maybe i will post a screen output of the running bot in a later post.About a full fledged app... You can use the script or parts of it. But i would not claim that everything works perfect. I am relativ new to the programming stuff and i work with python only. Not sure if i can help you.Btw, i started coding because i needed something to make my trade activities less time consuming. Also to play around with CRYPTOPIA's API...I've written some more scripts already, to do much more complex things (on and between different exchanges also). But i will not share everything. Only a selection of tools that are easy to use and hopefully useful for everyone in the same way. And only things for the use on CRYPTOPIA will be published.But let me know and write about your ideas, or send a private message. Then i will look and see what i can do.Further i would say, this bot is in a early stage, like a alpha version. (It's a improvement of my very first arbitrage script. Also i wrote it to test some features, which i plan to add/change in my private trading applications.) An update is already in work. CRYPTOPIA added some more parameters to it's API. This finally will make the TIMEMACHINE easier to set up. And yeah and i have a many ideas myself (but unfortunately less time). I plan to release one or two more scripts later, especially for traders. Like a command line tool to manage open market orders.      Yo thanks a lot. I think this not only looks cool... I have fun with it :) Btw, the API works beautiful!


Thread: API

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