@@ -200,21 +200,21 @@ def sell(self, marketid, quantity, price):
200200 ##
201201 # Outputs: If successful, it will return a success code.
202202 def cancel_order (self , orderid ):
203- return self .api_query ('cancelorder' , request_data = {'orderid' : orderid })
203+ return self ._api_query ('cancelorder' , request_data = {'orderid' : orderid })
204204
205205 # Inputs:
206206 # marketid Market ID for which you would like to cancel all open orders
207207 ##
208208 # Outputs:
209209 # return Array for return information on each order cancelled
210210 def cancel_all_market_orders (self , marketid ):
211- return self .api_query ('cancelmarketorders' ,
211+ return self ._api_query ('cancelmarketorders' ,
212212 request_data = {'marketid' : marketid })
213213
214214 # Outputs:
215215 # return Array for return information on each order cancelled
216216 def cancel_all_orders (self ):
217- return self .api_query ('cancelallorders' )
217+ return self ._api_query ('cancelallorders' )
218218
219219 # Inputs:
220220 # ordertype Order type you are calculating for (Buy/Sell)
@@ -225,10 +225,10 @@ def cancel_all_orders(self):
225225 # fee The that would be charged for provided inputs
226226 # net The net total with fees
227227 def calculate_fees (self , ordertype , quantity , price ):
228- return self .api_query ('calculatefees' ,
229- request_data = {'ordertype' : ordertype ,
230- 'quantity' : quantity ,
231- 'price' : price })
228+ return self ._api_query ('calculatefees' ,
229+ request_data = {'ordertype' : ordertype ,
230+ 'quantity' : quantity ,
231+ 'price' : price })
232232
233233 # Inputs: (either currencyid OR currencycode required - you do not have to supply both)
234234 # currencyid Currency ID for the coin you want to generate a new address for (ie. 3 = BitCoin)
@@ -237,11 +237,61 @@ def calculate_fees(self, ordertype, quantity, price):
237237 # Outputs:
238238 # address The new generated address
239239 def generate_new_address (self , currencyid = None , currencycode = None ):
240- if ( currencyid != None ) :
240+ if currencyid is not None :
241241 req = {'currencyid' : currencyid }
242- elif ( currencycode != None ) :
242+ elif currencycode is not None :
243243 req = {'currencycode' : currencycode }
244244 else :
245245 return None
246246
247247 return self ._api_query ('generatenewaddress' , request_data = req )
248+
249+ def my_transfers (self ):
250+ """ Array of all transfers into/out of your account sorted by requested
251+ datetime descending.
252+
253+ Resultset contains:
254+
255+ currency Currency being transfered
256+ request_timestamp Datetime the transfer was requested/initiated
257+ processed Indicator if transfer has been processed (1) or not (0)
258+ processed_timestamp Datetime of processed transfer
259+ from Username sending transfer
260+ to Username receiving transfer
261+ quantity Quantity being transfered
262+ direction Indicates if transfer is incoming or outgoing (in/out)
263+ """
264+ self ._api_query ('mytransfers' );
265+
266+ def wallet_status (self ):
267+ """ Array of Wallet Statuses
268+
269+ Resultset contains:
270+
271+ currencyid Integer value representing a currency
272+ name Name for this currency, for example: Bitcoin
273+ code Currency code, for example: BTC
274+ blockcount Blockcount of currency hot wallet as of lastupdate time
275+ difficulty Difficulty of currency hot wallet as of lastupdate time
276+ version Version of currency hotwallet as of lastupdate time
277+ peercount Connected peers of currency hot wallet as of lastupdate time
278+ hashrate Network hashrate of currency hot wallet as of lastupdate time
279+ gitrepo Git Repo URL for this currency
280+ withdrawalfee Fee charged for withdrawals of this currency
281+ lastupdate Datetime (EST) the hot wallet information was last updated
282+ """
283+ self ._api_query ('getwalletstatus' )
284+
285+ def make_withdrawal (self , address , amount ):
286+ """ Make a withdrawal to a trusted withdrawal address.
287+
288+ TODO: throw an exception if the request returned an error.
289+
290+ :param address: Pre-approved address for which you are withdrawing to.
291+ :param amount: Amount you are withdrawing, maximum of 8 decimals.
292+ """
293+ self ._api_query ('makewithdrawal' ,
294+ request_data = {
295+ 'address' : address ,
296+ 'amount' : amount
297+ })
0 commit comments