Struct kiteconnect_rust::KiteConnect
[−]
[src]
pub struct KiteConnect { /* fields omitted */ }
Methods
impl KiteConnect
[src]
pub fn new(api_key: &str, access_token: &str) -> Self
[src]
Constructor
pub fn set_access_token(&mut self, access_token: &str)
[src]
Sets an access token for this instance
pub fn login_url(&self) -> String
[src]
Returns the login url
pub fn get_access_token(
&mut self,
request_token: &str,
api_secret: &str
) -> Result<Value>
[src]
&mut self,
request_token: &str,
api_secret: &str
) -> Result<Value>
Request for access token
pub fn invalidate_access_token(&self, access_token: &str) -> Result<Response>
[src]
Invalidates the access token
pub fn renew_access_token(
&mut self,
access_token: &str,
api_secret: &str
) -> Result<Value>
[src]
&mut self,
access_token: &str,
api_secret: &str
) -> Result<Value>
Request for new access token
pub fn invalidate_refresh_token(&self, refresh_token: &str) -> Result<Response>
[src]
Invalidates the refresh token
pub fn margins(&self, segment: Option<String>) -> Result<Value>
[src]
Return the account balance and cash margin details for a particular segment
pub fn holdings(&self) -> Result<Value>
[src]
Get all holdings
pub fn positions(&self) -> Result<Value>
[src]
Get all positions
pub fn profile(&self) -> Result<Value>
[src]
Get user profile details
pub fn place_order(
&self,
exchange: &str,
tradingsymbol: &str,
transaction_type: &str,
quantity: &str,
variety: &str,
price: Option<&str>,
product: Option<&str>,
order_type: Option<&str>,
validity: Option<&str>,
disclosed_quantity: Option<&str>,
trigger_price: Option<&str>,
squareoff: Option<&str>,
stoploss: Option<&str>,
trailing_stoploss: Option<&str>,
tag: Option<&str>
) -> Result<Value>
[src]
&self,
exchange: &str,
tradingsymbol: &str,
transaction_type: &str,
quantity: &str,
variety: &str,
price: Option<&str>,
product: Option<&str>,
order_type: Option<&str>,
validity: Option<&str>,
disclosed_quantity: Option<&str>,
trigger_price: Option<&str>,
squareoff: Option<&str>,
stoploss: Option<&str>,
trailing_stoploss: Option<&str>,
tag: Option<&str>
) -> Result<Value>
Place an order
pub fn modify_order(
&self,
order_id: &str,
variety: &str,
parent_order_id: Option<&str>,
exchange: Option<&str>,
tradingsymbol: Option<&str>,
transaction_type: Option<&str>,
quantity: Option<&str>,
price: Option<&str>,
order_type: Option<&str>,
product: Option<&str>,
trigger_price: Option<&str>,
validity: Option<&str>,
disclosed_quantity: Option<&str>
) -> Result<Value>
[src]
&self,
order_id: &str,
variety: &str,
parent_order_id: Option<&str>,
exchange: Option<&str>,
tradingsymbol: Option<&str>,
transaction_type: Option<&str>,
quantity: Option<&str>,
price: Option<&str>,
order_type: Option<&str>,
product: Option<&str>,
trigger_price: Option<&str>,
validity: Option<&str>,
disclosed_quantity: Option<&str>
) -> Result<Value>
Modify an open order
pub fn cancel_order(
&self,
order_id: &str,
variety: &str,
parent_order_id: Option<&str>
) -> Result<Value>
[src]
&self,
order_id: &str,
variety: &str,
parent_order_id: Option<&str>
) -> Result<Value>
Cancel an order
pub fn exit_order(
&self,
order_id: &str,
variety: &str,
parent_order_id: Option<&str>
) -> Result<Value>
[src]
&self,
order_id: &str,
variety: &str,
parent_order_id: Option<&str>
) -> Result<Value>
Exit a BO/CO order
pub fn orders(&self) -> Result<Value>
[src]
Get a list of orders
pub fn order_history(&self, order_id: &str) -> Result<Value>
[src]
Get the list of order history
pub fn trades(&self) -> Result<Value>
[src]
Get all trades
pub fn order_trades(&self, order_id: &str) -> Result<Value>
[src]
Get all trades
pub fn convert_position(
&self,
exchange: &str,
tradingsymbol: &str,
transaction_type: &str,
position_type: &str,
quantity: &str,
old_product: &str,
new_product: &str
) -> Result<Value>
[src]
&self,
exchange: &str,
tradingsymbol: &str,
transaction_type: &str,
position_type: &str,
quantity: &str,
old_product: &str,
new_product: &str
) -> Result<Value>
Modify an open position product type
pub fn mf_orders(&self, order_id: Option<&str>) -> Result<Value>
[src]
Get all mutual fund orders or individual order info
pub fn place_mf_order(
&self,
tradingsymbol: &str,
transaction_type: &str,
quantity: Option<&str>,
amount: Option<&str>,
tag: Option<&str>
) -> Result<Value>
[src]
&self,
tradingsymbol: &str,
transaction_type: &str,
quantity: Option<&str>,
amount: Option<&str>,
tag: Option<&str>
) -> Result<Value>
Place a mutual fund order
pub fn cancel_mf_order(&self, order_id: &str) -> Result<Value>
[src]
Cancel a mutual fund order
pub fn mf_sips(&self, sip_id: Option<&str>) -> Result<Value>
[src]
Get list of mutual fund SIP's or individual SIP info
pub fn place_mf_sip(
&self,
tradingsymbol: &str,
amount: &str,
instalments: &str,
frequency: &str,
initial_amount: Option<&str>,
instalment_day: Option<&str>,
tag: Option<&str>
) -> Result<Value>
[src]
&self,
tradingsymbol: &str,
amount: &str,
instalments: &str,
frequency: &str,
initial_amount: Option<&str>,
instalment_day: Option<&str>,
tag: Option<&str>
) -> Result<Value>
Place a mutual fund SIP
pub fn modify_mf_sip(
&self,
sip_id: &str,
amount: &str,
status: &str,
instalments: &str,
frequency: &str,
instalment_day: Option<&str>
) -> Result<Value>
[src]
&self,
sip_id: &str,
amount: &str,
status: &str,
instalments: &str,
frequency: &str,
instalment_day: Option<&str>
) -> Result<Value>
Modify a mutual fund SIP
pub fn cancel_mf_sip(&self, sip_id: &str) -> Result<Value>
[src]
Cancel a mutual fund SIP
pub fn mf_holdings(&self) -> Result<Value>
[src]
Get a list of mutual fund holdings
pub fn mf_instruments(&self) -> Result<Response>
[src]
Get list of mutual fund instruments
pub fn instruments(&self, exchange: Option<&str>) -> Result<Response>
[src]
Retrieve the list of market instruments available to trade
pub fn quote(&self, instruments: Vec<&str>) -> Result<Value>
[src]
Retrieve quote for list of instruments
pub fn ohlc(&self, instruments: Vec<&str>) -> Result<Value>
[src]
Retreive OHLC and market depth for list of instruments
pub fn ltp(&self, instruments: Vec<&str>) -> Result<Value>
[src]
Retreive last price for list of instuments
pub fn instruments_margins(&self, segment: &str) -> Result<Value>
[src]
Retreive margins provided for individual segments
pub fn historical_data(
&self,
instrument_token: &str,
from_date: &str,
to_date: &str,
interval: &str,
continuos: &str
) -> Result<Value>
[src]
&self,
instrument_token: &str,
from_date: &str,
to_date: &str,
interval: &str,
continuos: &str
) -> Result<Value>
Retreive historical data (candles) for an instument