ritpytrading package¶
Submodules¶
ritpytrading.assets module¶
-
exception
ritpytrading.assets.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
class
ritpytrading.assets.
Asset
(asset_response)[source]¶ Bases:
object
case_response is a json obj returned from the API get request
-
ritpytrading.assets.
asset
(ses, ticker_sym)[source]¶ function that returns a single asset object given for a given ticker
ritpytrading.cases module¶
-
exception
ritpytrading.cases.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
class
ritpytrading.cases.
Case
(case_response)[source]¶ Bases:
object
case_response is a json obj returned from the API get request
-
class
ritpytrading.cases.
CaseLimits
(limit_response)[source]¶ Bases:
object
limit_response is a json obj returned from the API get request
ritpytrading.news module¶
-
exception
ritpytrading.news.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
class
ritpytrading.news.
News
(news_response)[source]¶ Bases:
object
case_response is a json obj returned from the API get request
ritpytrading.orders module¶
-
exception
ritpytrading.orders.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
class
ritpytrading.orders.
Order
(order_response)[source]¶ Bases:
object
order_response is a json obj returned from the API get request
-
ritpytrading.orders.
order
(ses, orderId, status='OPEN')[source]¶ status can be OPEN, TRANSACTED or CLOSED status OPEN by default returns a Order object of the order class given an order id
ritpytrading.securities module¶
-
exception
ritpytrading.securities.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
class
ritpytrading.securities.
Security
(security_response)[source]¶ Bases:
object
Security class takes a security_response object ( a list of json objects ) as its initializing paramenter to extract all relevant information security_response is a json obj returned from the API get request
ritpytrading.securities_book module¶
-
exception
ritpytrading.securities_book.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
ritpytrading.securities_book.
get_all_asks
(ses, ticker_sym)[source]¶ Returns a list of all JSON objects in ask side of the order
-
ritpytrading.securities_book.
get_all_bids
(ses, ticker_sym)[source]¶ Returns a list of all JSON objects in bid side of the order
ritpytrading.securities_history module¶
-
exception
ritpytrading.securities_history.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
class
ritpytrading.securities_history.
Security_History
(sec_history)[source]¶ Bases:
object
sec_history is a json obj returned from the API get request
ritpytrading.submit_cancel_orders module¶
-
exception
ritpytrading.submit_cancel_orders.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
ritpytrading.submit_cancel_orders.
cancel_order
(ses, order_id)[source]¶ function requires a requests.Session() object as the ses argument with a loaded API_KEY
-
ritpytrading.submit_cancel_orders.
cancel_order_bulk
(ses, price_direc, price_lim, volume_direc, volume_lim, all_flag=0)[source]¶ Volume < 0 for cancelling all open sell orders and Volume > 0 for cancelling all open buy orders query_gen example ‘Price < 20.0 AND Volume > 0’
ritpytrading.tenders module¶
-
exception
ritpytrading.tenders.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed
-
class
ritpytrading.tenders.
Tender
(tender_response)[source]¶ Bases:
object
case_response is a json obj returned from the API get request
ritpytrading.traders module¶
-
exception
ritpytrading.traders.
ApiException
[source]¶ Bases:
Exception
to print error messages and stop the program when needed