Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
Instrument => Security
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rich committed Jun 2, 2022
1 parent d715dd0 commit fa9fbff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ npm install @badlabs/trade-bot__db-types
|0.2.0|0.5.0|
|0.3.0|0.6.0|
|0.4.0|0.7.0|
|0.4.1|0.8.0|

<!--versions-compatability-end-->
32 changes: 16 additions & 16 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ export type Currency = {
}

/**
* Model Instrument
* Model Security
*
*/
export type Instrument = {
export type Security = {
name: string
ticker: string
price: number
currency_ticker: string
}

/**
* Model FollowedInstrument
* Model FollowedSecurity
*
*/
export type FollowedInstrument = {
instrument_ticker: string
export type FollowedSecurity = {
security_ticker: string
followed_since: Date
}

Expand All @@ -32,7 +32,7 @@ export type FollowedInstrument = {
*
*/
export type PortfolioPosition = {
instrument_ticker: string
security_ticker: string
amount: number
}

Expand All @@ -42,7 +42,7 @@ export type PortfolioPosition = {
*/
export type Order = {
exchange_id: string | null
instrument_ticker: string
security_ticker: string
status_first: string
operation_type: string
amount: number
Expand All @@ -57,7 +57,7 @@ export type Order = {
*/
export type Operation = {
exchange_id: string | null
instrument_ticker: string | null
security_ticker: string | null
status: string
operation_type: string
amount: number | null
Expand Down Expand Up @@ -103,22 +103,22 @@ export interface ICurrency = {
}

/**
* Model Instrument
* Model Security
*
*/
export interface IInstrument = {
export interface ISecurity = {
name: string
ticker: string
price: number
currency_ticker: string
}

/**
* Model FollowedInstrument
* Model FollowedSecurity
*
*/
export interface IFollowedInstrument = {
instrument_ticker: string
export interface IFollowedSecurity = {
security_ticker: string
followed_since: Date
}

Expand All @@ -127,7 +127,7 @@ export interface IFollowedInstrument = {
*
*/
export interface IPortfolioPosition = {
instrument_ticker: string
security_ticker: string
amount: number
}

Expand All @@ -137,7 +137,7 @@ export interface IPortfolioPosition = {
*/
export interface IOrder = {
exchange_id: string | null
instrument_ticker: string
security_ticker: string
status_first: string
operation_type: string
amount: number
Expand All @@ -152,7 +152,7 @@ export interface IOrder = {
*/
export interface IOperation = {
exchange_id: string | null
instrument_ticker: string | null
security_ticker: string | null
status: string
operation_type: string
amount: number | null
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@badlabs/trade-bot__db-types",
"version": "0.7.0",
"version": "0.8.0",
"description": "TypeScript types for sharing between trade-bot and trade-bots-dashboard.",
"homepage": "https://github.com/badlabs/trade-bot__db-types",
"bugs": {
Expand Down

0 comments on commit fa9fbff

Please sign in to comment.