@dripjs/types
Advanced tools
| import { ConnectionOptions } from 'typeorm'; | ||
| export interface Config { | ||
| env: string; | ||
| production: boolean; | ||
| database: Partial<ConnectionOptions>; | ||
| container: ConfigContainer; | ||
| exchange: ConfigExchange; | ||
| log: { | ||
| typeorm: boolean; | ||
| }; | ||
| } | ||
| export interface ConfigContainer { | ||
| intelService: ConfigIntelServer; | ||
| } | ||
| export interface ConfigIntelServer { | ||
| port: number; | ||
| username: string; | ||
| password: string; | ||
| } | ||
| export interface ConfigExchange { | ||
| [type: string]: ConfigExchangeCrypto; | ||
| } | ||
| export interface ConfigExchangeCrypto { | ||
| [exchange: string]: ExchangeCryptoAuthConfig; | ||
| } | ||
| export interface ExchangeCryptoAuthConfig { | ||
| apiKey: string; | ||
| apiSecret: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| export interface Exchange { | ||
| name: string; | ||
| type: ExchangeType; | ||
| isEnabled: boolean; | ||
| } | ||
| export declare enum ExchangeType { | ||
| Crypto = "crypto", | ||
| Stock = "stock", | ||
| Futures = "futures" | ||
| } | ||
| export declare enum SupportedExchange { | ||
| Bitmex = "bitmex", | ||
| BitmexTestNet = "bitmexTestNet" | ||
| } | ||
| export interface Market { | ||
| code: string; | ||
| name: string; | ||
| desc?: string; | ||
| } | ||
| export interface Pair { | ||
| name: string; | ||
| exchange: string; | ||
| baseAsset: string; | ||
| quoteAsset: string; | ||
| amountPrecision: number; | ||
| pricePrecision: number; | ||
| minOrderAmount: number; | ||
| maxOrderAmount: number; | ||
| minOrderPrice: number; | ||
| maxOrderPrice: number; | ||
| isEnabled: boolean; | ||
| } | ||
| export interface Stock { | ||
| code: string; | ||
| name: string; | ||
| fullName: string; | ||
| pricePrecision: number; | ||
| amountPrecision: number; | ||
| } | ||
| export declare type Symbol = Pair | Stock; | ||
| export interface Asset { | ||
| name: string; | ||
| precision: number; | ||
| } | ||
| export interface Credential { | ||
| apiKey: string; | ||
| apiSecret: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var ExchangeType; | ||
| (function (ExchangeType) { | ||
| ExchangeType["Crypto"] = "crypto"; | ||
| ExchangeType["Stock"] = "stock"; | ||
| ExchangeType["Futures"] = "futures"; | ||
| })(ExchangeType = exports.ExchangeType || (exports.ExchangeType = {})); | ||
| var SupportedExchange; | ||
| (function (SupportedExchange) { | ||
| SupportedExchange["Bitmex"] = "bitmex"; | ||
| SupportedExchange["BitmexTestNet"] = "bitmexTestNet"; | ||
| })(SupportedExchange = exports.SupportedExchange || (exports.SupportedExchange = {})); |
| export declare enum HttpMethod { | ||
| GET = "GET", | ||
| POST = "POST", | ||
| PUT = "PUT", | ||
| DELETE = "DELETE" | ||
| } | ||
| export interface HttpHeaders { | ||
| [key: string]: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var HttpMethod; | ||
| (function (HttpMethod) { | ||
| HttpMethod["GET"] = "GET"; | ||
| HttpMethod["POST"] = "POST"; | ||
| HttpMethod["PUT"] = "PUT"; | ||
| HttpMethod["DELETE"] = "DELETE"; | ||
| })(HttpMethod = exports.HttpMethod || (exports.HttpMethod = {})); |
| export * from './exchange'; | ||
| export * from './http'; | ||
| export * from './order'; | ||
| export * from './config'; |
| "use strict"; | ||
| function __export(m) { | ||
| for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
| } | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| __export(require("./exchange")); | ||
| __export(require("./http")); | ||
| __export(require("./order")); |
| export declare enum OrderStatus { | ||
| New = "New", | ||
| Filled = "Filled", | ||
| Rejected = "Rejected", | ||
| PartiallyFilled = "PartiallyFilled", | ||
| Canceled = "Canceled" | ||
| } | ||
| export declare enum OrderSide { | ||
| Buy = "buy", | ||
| Sell = "sell" | ||
| } | ||
| export declare type Nominal<T, Name extends string> = T & { | ||
| [Symbol.species]: Name; | ||
| }; | ||
| /** | ||
| * timestamp | ||
| * eg: 1535600337261 | ||
| */ | ||
| export declare type Timestamp = Nominal<number, 'Timestamp'>; | ||
| export declare type BigNumberString = Nominal<string, 'BigNumberString'>; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var OrderStatus; | ||
| (function (OrderStatus) { | ||
| OrderStatus["New"] = "New"; | ||
| OrderStatus["Filled"] = "Filled"; | ||
| OrderStatus["Rejected"] = "Rejected"; | ||
| OrderStatus["PartiallyFilled"] = "PartiallyFilled"; | ||
| OrderStatus["Canceled"] = "Canceled"; | ||
| })(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {})); | ||
| var OrderSide; | ||
| (function (OrderSide) { | ||
| OrderSide["Buy"] = "buy"; | ||
| OrderSide["Sell"] = "sell"; | ||
| })(OrderSide = exports.OrderSide || (exports.OrderSide = {})); |
| export * from './intelligence'; |
| "use strict"; | ||
| function __export(m) { | ||
| for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
| } | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| __export(require("./intelligence")); |
| import { OrderSide } from '../modules/order'; | ||
| export interface Ticker { | ||
| ask: number; | ||
| bid: number; | ||
| /** | ||
| * 0 is not supported by the exchange | ||
| */ | ||
| high: number; | ||
| /** | ||
| * 0 is not supported by the exchange | ||
| */ | ||
| low: number; | ||
| last: number; | ||
| volume: number; | ||
| time: number; | ||
| } | ||
| export interface Bar { | ||
| time: number; | ||
| open: number; | ||
| high: number; | ||
| low: number; | ||
| close: number; | ||
| volume: number; | ||
| } | ||
| export interface BarRequest { | ||
| symbol: string; | ||
| resolution: string; | ||
| start: number; | ||
| end: number; | ||
| } | ||
| export declare type Price = number; | ||
| export declare type Amount = number; | ||
| export interface Depth { | ||
| asks: [Price, Amount][]; | ||
| bids: [Price, Amount][]; | ||
| } | ||
| export interface Transaction { | ||
| time: number; | ||
| side: OrderSide; | ||
| price: number; | ||
| amount: number; | ||
| } | ||
| export declare type RealtimeType = Ticker | Depth | Transaction; | ||
| export interface IntelError { | ||
| name: string; | ||
| message: string; | ||
| } | ||
| export interface IntelRealtimeResponse { | ||
| channel: IntelChannel; | ||
| data: RealtimeType; | ||
| } | ||
| export declare enum IntelChannel { | ||
| Ticker = "tick", | ||
| Depth = "depth", | ||
| Transaction = "transaction" | ||
| } | ||
| export interface GetBarsInput { | ||
| exchange: string; | ||
| symbol: string; | ||
| resolution: string; | ||
| start: number; | ||
| end: number; | ||
| } | ||
| export interface RealtimeInput { | ||
| exchange: string; | ||
| symbol: string; | ||
| channel: IntelChannel; | ||
| } | ||
| export interface IntelClientOptions { | ||
| ip: string; | ||
| port: number; | ||
| username: string; | ||
| password: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var IntelChannel; | ||
| (function (IntelChannel) { | ||
| IntelChannel["Ticker"] = "tick"; | ||
| IntelChannel["Depth"] = "depth"; | ||
| IntelChannel["Transaction"] = "transaction"; | ||
| })(IntelChannel = exports.IntelChannel || (exports.IntelChannel = {})); |
+2
-5
@@ -1,5 +0,2 @@ | ||
| export * from './exchange'; | ||
| export * from './intelligence'; | ||
| export * from './http'; | ||
| export * from './order'; | ||
| export * from './config'; | ||
| export * from './modules'; | ||
| export * from './projects'; |
+2
-3
@@ -6,4 +6,3 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| __export(require("./exchange")); | ||
| __export(require("./http")); | ||
| __export(require("./order")); | ||
| __export(require("./modules")); | ||
| __export(require("./projects")); |
+1
-1
| { | ||
| "name": "@dripjs/types", | ||
| "version": "0.1.20", | ||
| "version": "0.1.21", | ||
| "description": "dripjs types", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
| import { ConnectionOptions } from 'typeorm'; | ||
| export interface Config { | ||
| env: string; | ||
| production: boolean; | ||
| database: Partial<ConnectionOptions>; | ||
| container: ConfigContainer; | ||
| exchange: ConfigExchange; | ||
| log: { | ||
| typeorm: boolean; | ||
| }; | ||
| } | ||
| export interface ConfigContainer { | ||
| intelService: ConfigIntelServer; | ||
| } | ||
| export interface ConfigIntelServer { | ||
| port: number; | ||
| username: string; | ||
| password: string; | ||
| } | ||
| export interface ConfigExchange { | ||
| [type: string]: ConfigExchangeCrypto; | ||
| } | ||
| export interface ConfigExchangeCrypto { | ||
| [exchange: string]: ExchangeCryptoAuthConfig; | ||
| } | ||
| export interface ExchangeCryptoAuthConfig { | ||
| apiKey: string; | ||
| apiSecret: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| import { Depth, Ticker, Transaction } from '.'; | ||
| export interface Exchange { | ||
| name: string; | ||
| type: ExchangeType; | ||
| isEnabled: boolean; | ||
| } | ||
| export declare enum ExchangeType { | ||
| Crypto = "crypto", | ||
| Stock = "stock", | ||
| Futures = "futures" | ||
| } | ||
| export declare enum SupportedExchange { | ||
| Bitmex = "bitmex", | ||
| BitmexTestNet = "bitmexTestNet" | ||
| } | ||
| export interface Market { | ||
| code: string; | ||
| name: string; | ||
| desc?: string; | ||
| } | ||
| export interface Pair { | ||
| name: string; | ||
| exchange: string; | ||
| baseAsset: string; | ||
| quoteAsset: string; | ||
| amountPrecision: number; | ||
| pricePrecision: number; | ||
| minOrderAmount: number; | ||
| maxOrderAmount: number; | ||
| minOrderPrice: number; | ||
| maxOrderPrice: number; | ||
| isEnabled: boolean; | ||
| } | ||
| export interface Stock { | ||
| code: string; | ||
| name: string; | ||
| fullName: string; | ||
| pricePrecision: number; | ||
| amountPrecision: number; | ||
| } | ||
| export declare type Symbol = Pair | Stock; | ||
| export interface Asset { | ||
| name: string; | ||
| precision: number; | ||
| } | ||
| export interface Credential { | ||
| apiKey: string; | ||
| apiSecret: string; | ||
| } | ||
| export declare type RealtimeType = Ticker | Depth | Transaction; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var ExchangeType; | ||
| (function (ExchangeType) { | ||
| ExchangeType["Crypto"] = "crypto"; | ||
| ExchangeType["Stock"] = "stock"; | ||
| ExchangeType["Futures"] = "futures"; | ||
| })(ExchangeType = exports.ExchangeType || (exports.ExchangeType = {})); | ||
| var SupportedExchange; | ||
| (function (SupportedExchange) { | ||
| SupportedExchange["Bitmex"] = "bitmex"; | ||
| SupportedExchange["BitmexTestNet"] = "bitmexTestNet"; | ||
| })(SupportedExchange = exports.SupportedExchange || (exports.SupportedExchange = {})); |
| export declare enum HttpMethod { | ||
| GET = "GET", | ||
| POST = "POST", | ||
| PUT = "PUT", | ||
| DELETE = "DELETE" | ||
| } | ||
| export interface HttpHeaders { | ||
| [key: string]: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var HttpMethod; | ||
| (function (HttpMethod) { | ||
| HttpMethod["GET"] = "GET"; | ||
| HttpMethod["POST"] = "POST"; | ||
| HttpMethod["PUT"] = "PUT"; | ||
| HttpMethod["DELETE"] = "DELETE"; | ||
| })(HttpMethod = exports.HttpMethod || (exports.HttpMethod = {})); |
| import { OrderSide } from './order'; | ||
| export interface Ticker { | ||
| ask: number; | ||
| bid: number; | ||
| /** | ||
| * 0 is not supported by the exchange | ||
| */ | ||
| high: number; | ||
| /** | ||
| * 0 is not supported by the exchange | ||
| */ | ||
| low: number; | ||
| last: number; | ||
| volume: number; | ||
| time: number; | ||
| } | ||
| export interface Bar { | ||
| time: number; | ||
| open: number; | ||
| high: number; | ||
| low: number; | ||
| close: number; | ||
| volume: number; | ||
| } | ||
| export interface BarRequest { | ||
| symbol: string; | ||
| resolution: string; | ||
| start: number; | ||
| end: number; | ||
| } | ||
| export declare type Price = number; | ||
| export declare type Amount = number; | ||
| export interface Depth { | ||
| asks: [Price, Amount][]; | ||
| bids: [Price, Amount][]; | ||
| } | ||
| export interface Transaction { | ||
| time: number; | ||
| side: OrderSide; | ||
| price: number; | ||
| amount: number; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); |
| export declare enum OrderStatus { | ||
| New = "New", | ||
| Filled = "Filled", | ||
| Rejected = "Rejected", | ||
| PartiallyFilled = "PartiallyFilled", | ||
| Canceled = "Canceled" | ||
| } | ||
| export declare enum OrderSide { | ||
| Buy = "buy", | ||
| Sell = "sell" | ||
| } | ||
| export declare type Nominal<T, Name extends string> = T & { | ||
| [Symbol.species]: Name; | ||
| }; | ||
| /** | ||
| * timestamp | ||
| * eg: 1535600337261 | ||
| */ | ||
| export declare type Timestamp = Nominal<number, 'Timestamp'>; | ||
| export declare type BigNumberString = Nominal<string, 'BigNumberString'>; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| var OrderStatus; | ||
| (function (OrderStatus) { | ||
| OrderStatus["New"] = "New"; | ||
| OrderStatus["Filled"] = "Filled"; | ||
| OrderStatus["Rejected"] = "Rejected"; | ||
| OrderStatus["PartiallyFilled"] = "PartiallyFilled"; | ||
| OrderStatus["Canceled"] = "Canceled"; | ||
| })(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {})); | ||
| var OrderSide; | ||
| (function (OrderSide) { | ||
| OrderSide["Buy"] = "buy"; | ||
| OrderSide["Sell"] = "sell"; | ||
| })(OrderSide = exports.OrderSide || (exports.OrderSide = {})); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7516
21.7%18
28.57%255
25%1
Infinity%