| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e8549fe commit bbb8aa2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ def post_process(self, before): | |||
| 22 | 22 | if(isinstance(after['return'][x], dict)): | |
| 23 | 23 | if('datetime' in after['return'][x] and 'timestamp' not in after['return'][x]): | |
| 24 | 24 | after['return'][x]['timestamp'] = float(createTimeStamp(after['return'][x]['datetime'])) | |
| 25 | - | ||
| 25 | + | ||
| 26 | 26 | return after | |
| 27 | 27 | ||
| 28 | 28 | def api_query(self, method, req={}): | |
@@ -62,7 +62,7 @@ def getOrderbookData(self, marketid=None): | |||
| 62 | 62 | return self.api_query("orderdata") | |
| 63 | 63 | return self.api_query("singleorderdata", {'marketid': marketid}) | |
| 64 | 64 | ||
| 65 | - # Outputs: | ||
| 65 | + # Outputs: | ||
| 66 | 66 | # balances_available Array of currencies and the balances availalbe for each | |
| 67 | 67 | # balances_hold Array of currencies and the amounts currently on hold for open orders | |
| 68 | 68 | # servertimestamp Current server timestamp | |
@@ -73,7 +73,7 @@ def getInfo(self): | |||
| 73 | 73 | return self.api_query('getinfo') | |
| 74 | 74 | ||
| 75 | 75 | ||
| 76 | - # Outputs: Array of Active Markets | ||
| 76 | + # Outputs: Array of Active Markets | ||
| 77 | 77 | # marketid Integer value representing a market | |
| 78 | 78 | # label Name for this market, for example: AMC/BTC | |
| 79 | 79 | # primary_currency_code Primary currency code, for example: AMC | |
@@ -86,7 +86,7 @@ def getInfo(self): | |||
| 86 | 86 | # low_trade 24 hour lowest trade price in this market | |
| 87 | 87 | def getMarkets(self): | |
| 88 | 88 | return self.api_query('getmarkets') | |
| 89 | - | ||
| 89 | + | ||
| 90 | 90 | #Outputs: Array of Wallet Statuses | |
| 91 | 91 | #currencyid Integer value representing a currency | |
| 92 | 92 | #name Name for this currency, for example: Bitcoin | |
@@ -103,7 +103,7 @@ def getWalletStatus(self): | |||
| 103 | 103 | return self.api_query('getwalletstatus') | |
| 104 | 104 | ||
| 105 | 105 | ||
| 106 | - # Outputs: Array of Deposits and Withdrawals on your account | ||
| 106 | + # Outputs: Array of Deposits and Withdrawals on your account | ||
| 107 | 107 | # currency Name of currency account | |
| 108 | 108 | # timestamp The timestamp the activity posted | |
| 109 | 109 | # datetime The datetime the activity posted | |
@@ -118,7 +118,7 @@ def myTransactions(self): | |||
| 118 | 118 | # Inputs: | |
| 119 | 119 | # marketid Market ID for which you are querying | |
| 120 | 120 | ## | |
| 121 | - # Outputs: Array of last 1000 Trades for this Market, in Date Decending Order | ||
| 121 | + # Outputs: Array of last 1000 Trades for this Market, in Date Decending Order | ||
| 122 | 122 | # datetime Server datetime trade occurred | |
| 123 | 123 | # tradeprice The price the trade occurred at | |
| 124 | 124 | # quantity Quantity traded | |
@@ -130,7 +130,7 @@ def marketTrades(self, marketid): | |||
| 130 | 130 | # Inputs: | |
| 131 | 131 | # marketid Market ID for which you are querying | |
| 132 | 132 | ## | |
| 133 | - # Outputs: 2 Arrays. First array is sellorders listing current open sell orders ordered price ascending. Second array is buyorders listing current open buy orders ordered price descending. | ||
| 133 | + # Outputs: 2 Arrays. First array is sellorders listing current open sell orders ordered price ascending. Second array is buyorders listing current open buy orders ordered price descending. | ||
| 134 | 134 | # sellprice If a sell order, price which order is selling at | |
| 135 | 135 | # buyprice If a buy order, price the order is buying at | |
| 136 | 136 | # quantity Quantity on order | |
@@ -143,7 +143,7 @@ def marketOrders(self, marketid): | |||
| 143 | 143 | # marketid Market ID for which you are querying | |
| 144 | 144 | # limit (optional) Limit the number of results. Default: 200 | |
| 145 | 145 | ## | |
| 146 | - # Outputs: Array your Trades for this Market, in Date Decending Order | ||
| 146 | + # Outputs: Array your Trades for this Market, in Date Decending Order | ||
| 147 | 147 | # tradeid An integer identifier for this trade | |
| 148 | 148 | # tradetype Type of trade (Buy/Sell) | |
| 149 | 149 | # datetime Server datetime trade occurred | |
@@ -154,7 +154,7 @@ def myTrades(self, marketid, limit=200): | |||
| 154 | 154 | return self.api_query('mytrades', {'marketid': marketid, 'limit': limit}) | |
| 155 | 155 | ||
| 156 | 156 | ||
| 157 | - # Outputs: Array your Trades for all Markets, in Date Decending Order | ||
| 157 | + # Outputs: Array your Trades for all Markets, in Date Decending Order | ||
| 158 | 158 | # tradeid An integer identifier for this trade | |
| 159 | 159 | # tradetype Type of trade (Buy/Sell) | |
| 160 | 160 | # datetime Server datetime trade occurred | |
@@ -169,7 +169,7 @@ def allMyTrades(self): | |||
| 169 | 169 | # Inputs: | |
| 170 | 170 | # marketid Market ID for which you are querying | |
| 171 | 171 | ## | |
| 172 | - # Outputs: Array of your orders for this market listing your current open sell and buy orders. | ||
| 172 | + # Outputs: Array of your orders for this market listing your current open sell and buy orders. | ||
| 173 | 173 | # orderid Order ID for this order | |
| 174 | 174 | # created Datetime the order was created | |
| 175 | 175 | # ordertype Type of order (Buy/Sell) | |
@@ -183,16 +183,16 @@ def myOrders(self, marketid): | |||
| 183 | 183 | # Inputs: | |
| 184 | 184 | # marketid Market ID for which you are querying | |
| 185 | 185 | ## | |
| 186 | - # Outputs: Array of buy and sell orders on the market representing market depth. | ||
| 186 | + # Outputs: Array of buy and sell orders on the market representing market depth. | ||
| 187 | 187 | # Output Format is: | |
| 188 | 188 | # array( | |
| 189 | 189 | # 'sell'=>array( | |
| 190 | - # array(price,quantity), | ||
| 190 | + # array(price,quantity), | ||
| 191 | 191 | # array(price,quantity), | |
| 192 | 192 | # .... | |
| 193 | - # ), | ||
| 193 | + # ), | ||
| 194 | 194 | # 'buy'=>array( | |
| 195 | - # array(price,quantity), | ||
| 195 | + # array(price,quantity), | ||
| 196 | 196 | # array(price,quantity), | |
| 197 | 197 | # .... | |
| 198 | 198 | # ) | |
@@ -201,7 +201,7 @@ def depth(self, marketid): | |||
| 201 | 201 | return self.api_query('depth', {'marketid': marketid}) | |
| 202 | 202 | ||
| 203 | 203 | ||
| 204 | - # Outputs: Array of all open orders for your account. | ||
| 204 | + # Outputs: Array of all open orders for your account. | ||
| 205 | 205 | # orderid Order ID for this order | |
| 206 | 206 | # marketid The Market ID this order was created for | |
| 207 | 207 | # created Datetime the order was created | |
@@ -219,30 +219,30 @@ def allMyOrders(self): | |||
| 219 | 219 | # quantity Amount of units you are buying/selling in this order | |
| 220 | 220 | # price Price per unit you are buying/selling at | |
| 221 | 221 | ## | |
| 222 | - # Outputs: | ||
| 222 | + # Outputs: | ||
| 223 | 223 | # orderid If successful, the Order ID for the order which was created | |
| 224 | 224 | def createOrder(self, marketid, ordertype, quantity, price): | |
| 225 | 225 | return self.api_query('createorder', {'marketid': marketid, 'ordertype': ordertype, 'quantity': quantity, 'price': price}) | |
| 226 | - | ||
| 226 | + | ||
| 227 | 227 | ||
| 228 | 228 | # Inputs: | |
| 229 | 229 | # orderid Order ID for which you would like to cancel | |
| 230 | 230 | ## | |
| 231 | - # Outputs: If successful, it will return a success code. | ||
| 231 | + # Outputs: If successful, it will return a success code. | ||
| 232 | 232 | def cancelOrder(self, orderid): | |
| 233 | 233 | return self.api_query('cancelorder', {'orderid': orderid}) | |
| 234 | 234 | ||
| 235 | 235 | ||
| 236 | 236 | # Inputs: | |
| 237 | 237 | # marketid Market ID for which you would like to cancel all open orders | |
| 238 | 238 | ## | |
| 239 | - # Outputs: | ||
| 239 | + # Outputs: | ||
| 240 | 240 | # return Array for return information on each order cancelled | |
| 241 | 241 | def cancelMarketOrders(self, marketid): | |
| 242 | 242 | return self.api_query('cancelmarketorders', {'marketid': marketid}) | |
| 243 | 243 | ||
| 244 | 244 | ||
| 245 | - # Outputs: | ||
| 245 | + # Outputs: | ||
| 246 | 246 | # return Array for return information on each order cancelled | |
| 247 | 247 | def cancelAllOrders(self): | |
| 248 | 248 | return self.api_query('cancelallorders') | |
@@ -252,7 +252,7 @@ def cancelAllOrders(self): | |||
| 252 | 252 | # quantity Amount of units you are buying/selling | |
| 253 | 253 | # price Price per unit you are buying/selling at | |
| 254 | 254 | ## | |
| 255 | - # Outputs: | ||
| 255 | + # Outputs: | ||
| 256 | 256 | # fee The that would be charged for provided inputs | |
| 257 | 257 | # net The net total with fees | |
| 258 | 258 | def calculateFees(self, ordertype, quantity, price): | |
@@ -263,7 +263,7 @@ def calculateFees(self, ordertype, quantity, price): | |||
| 263 | 263 | # currencyid Currency ID for the coin you want to generate a new address for (ie. 3 = BitCoin) | |
| 264 | 264 | # currencycode Currency Code for the coin you want to generate a new address for (ie. BTC = BitCoin) | |
| 265 | 265 | ## | |
| 266 | - # Outputs: | ||
| 266 | + # Outputs: | ||
| 267 | 267 | # address The new generated address | |
| 268 | 268 | def generateNewAddress(self, currencyid=None, currencycode=None): | |
| 269 | 269 | ||
@@ -275,3 +275,17 @@ def generateNewAddress(self, currencyid=None, currencycode=None): | |||
| 275 | 275 | return None | |
| 276 | 276 | ||
| 277 | 277 | return self.api_query('generatenewaddress', req) | |
| 278 | + | ||
| 279 | + | ||
| 280 | + # Inputs: | ||
| 281 | + # orderid Order ID for which you are querying | ||
| 282 | + ## | ||
| 283 | + # Outputs: tradeinfo is a list of all the trades that have occured in your order. Where orderinfo shows realtime status of the order. Orderinfo contains the 'active'; a boolean object showing if the order is still open. Orderinfo also contains 'remainqty' which shows the quantity left in your order. | ||
| 284 | + # tradeinfo A list of all trades that have occuried in your order. | ||
| 285 | + # orderinfo Information regarding status of the order. Contains 'active' and 'remainqty' keys. | ||
| 286 | + | ||
| 287 | + def getOrderStatus(self, orderid): | ||
| 288 | + return self.api_query('getorderstatus', {'orderid': orderid}) | ||
| 289 | + | ||
| 290 | + def getCoinData(self): | ||
| 291 | + return self.api_query('getcoindata') | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments