Skip to content

Commit

Permalink
feat: exporting types from connect.d.ts & ticket.d.ts as these ar…
Browse files Browse the repository at this point in the history
…e some types we require during development.
  • Loading branch information
Xenofic committed Sep 1, 2024
1 parent 1950324 commit 3e2a6d1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
52 changes: 26 additions & 26 deletions types/connect.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type Exchanges =
export type Exchanges =
| Connect['EXCHANGE_NSE']
| Connect['EXCHANGE_BSE']
| Connect['EXCHANGE_NFO']
Expand All @@ -7,40 +7,40 @@ type Exchanges =
| Connect['EXCHANGE_BFO']
| Connect['EXCHANGE_MCX'];

type TransactionType =
export type TransactionType =
| Connect['TRANSACTION_TYPE_BUY']
| Connect['TRANSACTION_TYPE_SELL'];

type PositionTypes =
export type PositionTypes =
| Connect['POSITION_TYPE_DAY']
| Connect['POSITION_TYPE_OVERNIGHT'];

type Product =
export type Product =
| Connect['PRODUCT_NRML']
| Connect['PRODUCT_MIS']
| Connect['PRODUCT_CNC'];

type OrderType =
export type OrderType =
| Connect['ORDER_TYPE_LIMIT']
| Connect['ORDER_TYPE_MARKET']
| Connect['ORDER_TYPE_SL']
| Connect['ORDER_TYPE_SLM'];

type Variety =
export type Variety =
| Connect['VARIETY_AMO']
| Connect['VARIETY_AUCTION']
| Connect['VARIETY_CO']
| Connect['VARIETY_ICEBERG']
| Connect['VARIETY_REGULAR'];

type Validity =
export type Validity =
| Connect['VALIDITY_DAY']
| Connect['VALIDITY_IOC']
| Connect['VALIDITY_TTL'];

type TriggerType = Connect['GTT_TYPE_OCO'] | Connect['GTT_TYPE_SINGLE'];
export type TriggerType = Connect['GTT_TYPE_OCO'] | Connect['GTT_TYPE_SINGLE'];

type SessionData = {
export type SessionData = {
/**
* The unique, permanent user id registered with the broker and the exchanges
*/
Expand Down Expand Up @@ -115,7 +115,7 @@ type SessionData = {
avatar_url: string;
};

type Trigger = {
export type Trigger = {
id: number;
user_id: string;
parent_trigger: any;
Expand Down Expand Up @@ -169,7 +169,7 @@ type Trigger = {
meta: any;
};

type PortfolioHolding = {
export type PortfolioHolding = {
/**
* Exchange tradingsymbol of the instrument
*/
Expand Down Expand Up @@ -257,7 +257,7 @@ type PortfolioHolding = {
day_change_percentage: number;
};

type Instrument = {
export type Instrument = {
/**
* Numerical identifier used for subscribing to live market quotes with the WebSocket API.
*/
Expand Down Expand Up @@ -308,7 +308,7 @@ type Instrument = {
exchange: Exchanges;
};

type UserMargin = {
export type UserMargin = {
/**
* Indicates whether the segment is enabled for the user
*/
Expand Down Expand Up @@ -395,7 +395,7 @@ type UserMargin = {
};
};

type MFHolding = {
export type MFHolding = {
/**
* Folio number generated by AMC for the completed purchase order (null incase of SELL order)
*/
Expand Down Expand Up @@ -431,7 +431,7 @@ type MFHolding = {
quantity: number;
};

type MFInstrument = {
export type MFInstrument = {
/**
* ISIN of the fund
*/
Expand Down Expand Up @@ -492,7 +492,7 @@ type MFInstrument = {
last_price_date: Date;
};

type MFOrder = {
export type MFOrder = {
/**
* Unique order id
*/
Expand Down Expand Up @@ -583,7 +583,7 @@ type MFOrder = {
tag: any;
};

type MFSIP = {
export type MFSIP = {
/**
* Unique SIP id
*/
Expand Down Expand Up @@ -654,7 +654,7 @@ type MFSIP = {
sip_type: string;
};

type Order = {
export type Order = {
/**
* Unique order ID
*/
Expand Down Expand Up @@ -778,7 +778,7 @@ type Order = {
market_protection: number;
};

type Trade = {
export type Trade = {
/**
* Exchange generated trade ID
*/
Expand Down Expand Up @@ -835,7 +835,7 @@ type Trade = {
exchange_timestamp: Date;
};

type Position = {
export type Position = {
/**
* Exchange tradingsymbol of the instrument
*/
Expand Down Expand Up @@ -954,7 +954,7 @@ type Position = {
day_sell_value: number;
};

type Margin = {
export type Margin = {
/**
* equity/commodity
*/
Expand Down Expand Up @@ -1066,7 +1066,7 @@ type Margin = {
total: number;
};

type MarginOrder = {
export type MarginOrder = {
/**
* Name of the exchange(eg. NSE, BSE, NFO, CDS, MCX)
*/
Expand Down Expand Up @@ -1105,7 +1105,7 @@ type MarginOrder = {
trigger_price: number;
};

type VirtualContractParam = {
export type VirtualContractParam = {
/**
* Unique order ID (It can be any random string to calculate charges for an imaginary order)
*/
Expand Down Expand Up @@ -1144,7 +1144,7 @@ type VirtualContractParam = {
average_price: number;
};

type VirtualContractResponse = {
export type VirtualContractResponse = {
/**
* Transaction type of the order (e.g., BUY, SELL)
*/
Expand Down Expand Up @@ -1233,7 +1233,7 @@ type VirtualContractResponse = {
};
}

type GTTParams = {
export type GTTParams = {
/**
* GTT type, its either self.GTT_TYPE_OCO or self.GTT_TYPE_SINGLE.
*/
Expand Down Expand Up @@ -1319,7 +1319,7 @@ export type KiteConnectParams = {
timeout?: number;
};

type Connect = {
export type Connect = {
// Constants

// Products
Expand Down
2 changes: 1 addition & 1 deletion types/ticker.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type KiteTickerParams = {
export type KiteTickerParams = {
/**
* API key issued you.
*/
Expand Down

0 comments on commit 3e2a6d1

Please sign in to comment.