@himalaya-quant/ctrader-x 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +6 -0
- package/.prettierrc +7 -0
- package/README.md +96 -0
- package/changelog.md +46 -0
- package/dist/src/classes/client.d.ts +21 -0
- package/dist/src/classes/client.d.ts.map +1 -0
- package/dist/src/classes/client.js +83 -0
- package/dist/src/classes/client.js.map +1 -0
- package/dist/src/classes/client.test.d.ts +2 -0
- package/dist/src/classes/client.test.d.ts.map +1 -0
- package/dist/src/classes/client.test.js +83 -0
- package/dist/src/classes/client.test.js.map +1 -0
- package/dist/src/classes/errors/client-not-connected.error.d.ts +5 -0
- package/dist/src/classes/errors/client-not-connected.error.d.ts.map +1 -0
- package/dist/src/classes/errors/client-not-connected.error.js +11 -0
- package/dist/src/classes/errors/client-not-connected.error.js.map +1 -0
- package/dist/src/classes/errors/connection.error.d.ts +5 -0
- package/dist/src/classes/errors/connection.error.d.ts.map +1 -0
- package/dist/src/classes/errors/connection.error.js +11 -0
- package/dist/src/classes/errors/connection.error.js.map +1 -0
- package/dist/src/classes/logger.d.ts +13 -0
- package/dist/src/classes/logger.d.ts.map +1 -0
- package/dist/src/classes/logger.js +21 -0
- package/dist/src/classes/logger.js.map +1 -0
- package/dist/src/classes/managers/authentication/authentication.manager.d.ts +13 -0
- package/dist/src/classes/managers/authentication/authentication.manager.d.ts.map +1 -0
- package/dist/src/classes/managers/authentication/authentication.manager.js +49 -0
- package/dist/src/classes/managers/authentication/authentication.manager.js.map +1 -0
- package/dist/src/classes/managers/authentication/authentication.manager.test.d.ts +2 -0
- package/dist/src/classes/managers/authentication/authentication.manager.test.d.ts.map +1 -0
- package/dist/src/classes/managers/authentication/authentication.manager.test.js +114 -0
- package/dist/src/classes/managers/authentication/authentication.manager.test.js.map +1 -0
- package/dist/src/classes/managers/authentication/errors/application-auth.error.d.ts +5 -0
- package/dist/src/classes/managers/authentication/errors/application-auth.error.d.ts.map +1 -0
- package/dist/src/classes/managers/authentication/errors/application-auth.error.js +11 -0
- package/dist/src/classes/managers/authentication/errors/application-auth.error.js.map +1 -0
- package/dist/src/classes/managers/authentication/errors/user-auth.error.d.ts +5 -0
- package/dist/src/classes/managers/authentication/errors/user-auth.error.d.ts.map +1 -0
- package/dist/src/classes/managers/authentication/errors/user-auth.error.js +11 -0
- package/dist/src/classes/managers/authentication/errors/user-auth.error.js.map +1 -0
- package/dist/src/classes/managers/models/base.manager.d.ts +15 -0
- package/dist/src/classes/managers/models/base.manager.d.ts.map +1 -0
- package/dist/src/classes/managers/models/base.manager.js +35 -0
- package/dist/src/classes/managers/models/base.manager.js.map +1 -0
- package/dist/src/classes/managers/models/credentials.model.d.ts +8 -0
- package/dist/src/classes/managers/models/credentials.model.d.ts.map +1 -0
- package/dist/src/classes/managers/models/credentials.model.js +3 -0
- package/dist/src/classes/managers/models/credentials.model.js.map +1 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-details.error.d.ts +5 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-details.error.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-details.error.js +11 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-details.error.js.map +1 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-list.error.d.ts +5 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-list.error.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-list.error.js +11 -0
- package/dist/src/classes/managers/symbols/errors/get-symbols-list.error.js.map +1 -0
- package/dist/src/classes/managers/symbols/errors/get-trend-bars.error.d.ts +6 -0
- package/dist/src/classes/managers/symbols/errors/get-trend-bars.error.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/errors/get-trend-bars.error.js +13 -0
- package/dist/src/classes/managers/symbols/errors/get-trend-bars.error.js.map +1 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-live-trend-bars.error.d.ts +8 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-live-trend-bars.error.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-live-trend-bars.error.js +17 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-live-trend-bars.error.js.map +1 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-spot-events.error.d.ts +5 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-spot-events.error.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-spot-events.error.js +11 -0
- package/dist/src/classes/managers/symbols/errors/subscribe-spot-events.error.js.map +1 -0
- package/dist/src/classes/managers/symbols/errors/unsubscribe-live-trend-bars.error.d.ts +5 -0
- package/dist/src/classes/managers/symbols/errors/unsubscribe-live-trend-bars.error.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/errors/unsubscribe-live-trend-bars.error.js +11 -0
- package/dist/src/classes/managers/symbols/errors/unsubscribe-live-trend-bars.error.js.map +1 -0
- package/dist/src/classes/managers/symbols/symbols-updates.manager.d.ts +54 -0
- package/dist/src/classes/managers/symbols/symbols-updates.manager.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/symbols-updates.manager.js +250 -0
- package/dist/src/classes/managers/symbols/symbols-updates.manager.js.map +1 -0
- package/dist/src/classes/managers/symbols/symbols.manager.d.ts +30 -0
- package/dist/src/classes/managers/symbols/symbols.manager.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/symbols.manager.js +78 -0
- package/dist/src/classes/managers/symbols/symbols.manager.js.map +1 -0
- package/dist/src/classes/managers/symbols/symbols.manager.test.d.ts +2 -0
- package/dist/src/classes/managers/symbols/symbols.manager.test.d.ts.map +1 -0
- package/dist/src/classes/managers/symbols/symbols.manager.test.js +364 -0
- package/dist/src/classes/managers/symbols/symbols.manager.test.js.map +1 -0
- package/dist/src/classes/models/client-configuration.model.d.ts +10 -0
- package/dist/src/classes/models/client-configuration.model.d.ts.map +1 -0
- package/dist/src/classes/models/client-configuration.model.js +3 -0
- package/dist/src/classes/models/client-configuration.model.js.map +1 -0
- package/dist/src/classes/models/ctrader-x-error.model.d.ts +6 -0
- package/dist/src/classes/models/ctrader-x-error.model.d.ts.map +1 -0
- package/dist/src/classes/models/ctrader-x-error.model.js +21 -0
- package/dist/src/classes/models/ctrader-x-error.model.js.map +1 -0
- package/dist/src/config/config.d.ts +10 -0
- package/dist/src/config/config.d.ts.map +1 -0
- package/dist/src/config/config.js +40 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/examples/authentication.example.d.ts +2 -0
- package/dist/src/examples/authentication.example.d.ts.map +1 -0
- package/dist/src/examples/authentication.example.js +9 -0
- package/dist/src/examples/authentication.example.js.map +1 -0
- package/dist/src/examples/get-symbols-bars.example.d.ts +2 -0
- package/dist/src/examples/get-symbols-bars.example.d.ts.map +1 -0
- package/dist/src/examples/get-symbols-bars.example.js +18 -0
- package/dist/src/examples/get-symbols-bars.example.js.map +1 -0
- package/dist/src/examples/get-symbols-list.example.d.ts +2 -0
- package/dist/src/examples/get-symbols-list.example.d.ts.map +1 -0
- package/dist/src/examples/get-symbols-list.example.js +13 -0
- package/dist/src/examples/get-symbols-list.example.js.map +1 -0
- package/dist/src/examples/subscribe-live-bars.example.d.ts +2 -0
- package/dist/src/examples/subscribe-live-bars.example.d.ts.map +1 -0
- package/dist/src/examples/subscribe-live-bars.example.js +42 -0
- package/dist/src/examples/subscribe-live-bars.example.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +20 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/models/common/ohlcv.d.ts +10 -0
- package/dist/src/models/common/ohlcv.d.ts.map +1 -0
- package/dist/src/models/common/ohlcv.js +13 -0
- package/dist/src/models/common/ohlcv.js.map +1 -0
- package/dist/src/models/proto/base-proto.d.ts +5 -0
- package/dist/src/models/proto/base-proto.d.ts.map +1 -0
- package/dist/src/models/proto/base-proto.js +9 -0
- package/dist/src/models/proto/base-proto.js.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthReq.d.ts +5 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthReq.js +9 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthReq.js.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthRes.d.ts +4 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthRes.js +8 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAAccountAuthRes.js.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthReq.d.ts +6 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthReq.js +10 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthReq.js.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthRes.d.ts +4 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthRes.js +8 -0
- package/dist/src/models/proto/messages/authentication/ProtoOAApplicationAuthRes.js.map +1 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsReq.d.ts +6 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsReq.js +10 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsReq.js.map +1 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsRes.d.ts +4 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsRes.js +8 -0
- package/dist/src/models/proto/messages/common/ProtoOASubscribeSpotsRes.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsReq.d.ts +10 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsReq.js +13 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsReq.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsRes.d.ts +11 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsRes.js +13 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAGetTrendbarsRes.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarReq.d.ts +7 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarReq.js +10 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarReq.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarRes.d.ts +4 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarRes.js +8 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarRes.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdReq.d.ts +5 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdReq.js +9 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdReq.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdRes.d.ts +8 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdRes.js +10 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolByIdRes.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListReq.d.ts +5 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListReq.js +9 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListReq.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListRes.d.ts +7 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListRes.js +10 -0
- package/dist/src/models/proto/messages/symbols/ProtoOASymbolsListRes.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarReq.d.ts +7 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarReq.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarReq.js +10 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarReq.js.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarRes.d.ts +4 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarRes.d.ts.map +1 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarRes.js +8 -0
- package/dist/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarRes.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOAArchivedSymbol.d.ts +7 -0
- package/dist/src/models/proto/models/ProtoOAArchivedSymbol.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOAArchivedSymbol.js +11 -0
- package/dist/src/models/proto/models/ProtoOAArchivedSymbol.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOAErrorRes.d.ts +8 -0
- package/dist/src/models/proto/models/ProtoOAErrorRes.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOAErrorRes.js +12 -0
- package/dist/src/models/proto/models/ProtoOAErrorRes.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOAHoliday.d.ts +9 -0
- package/dist/src/models/proto/models/ProtoOAHoliday.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOAHoliday.js +13 -0
- package/dist/src/models/proto/models/ProtoOAHoliday.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOAInterval.d.ts +6 -0
- package/dist/src/models/proto/models/ProtoOAInterval.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOAInterval.js +10 -0
- package/dist/src/models/proto/models/ProtoOAInterval.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOALightSymbol.d.ts +11 -0
- package/dist/src/models/proto/models/ProtoOALightSymbol.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOALightSymbol.js +15 -0
- package/dist/src/models/proto/models/ProtoOALightSymbol.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOASpotEvent.d.ts +11 -0
- package/dist/src/models/proto/models/ProtoOASpotEvent.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOASpotEvent.js +14 -0
- package/dist/src/models/proto/models/ProtoOASpotEvent.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOASymbol.d.ts +44 -0
- package/dist/src/models/proto/models/ProtoOASymbol.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOASymbol.js +46 -0
- package/dist/src/models/proto/models/ProtoOASymbol.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOATrendbar.d.ts +11 -0
- package/dist/src/models/proto/models/ProtoOATrendbar.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOATrendbar.js +14 -0
- package/dist/src/models/proto/models/ProtoOATrendbar.js.map +1 -0
- package/dist/src/models/proto/models/ProtoOATrendbarPeriod.d.ts +17 -0
- package/dist/src/models/proto/models/ProtoOATrendbarPeriod.d.ts.map +1 -0
- package/dist/src/models/proto/models/ProtoOATrendbarPeriod.js +21 -0
- package/dist/src/models/proto/models/ProtoOATrendbarPeriod.js.map +1 -0
- package/dist/src/models/proto/payload-types/payload-types.enum.d.ts +78 -0
- package/dist/src/models/proto/payload-types/payload-types.enum.d.ts.map +1 -0
- package/dist/src/models/proto/payload-types/payload-types.enum.js +82 -0
- package/dist/src/models/proto/payload-types/payload-types.enum.js.map +1 -0
- package/dist/src/utils/price.utils.d.ts +4 -0
- package/dist/src/utils/price.utils.d.ts.map +1 -0
- package/dist/src/utils/price.utils.js +36 -0
- package/dist/src/utils/price.utils.js.map +1 -0
- package/dist/src/utils/sleep.utils.d.ts +5 -0
- package/dist/src/utils/sleep.utils.d.ts.map +1 -0
- package/dist/src/utils/sleep.utils.js +15 -0
- package/dist/src/utils/sleep.utils.js.map +1 -0
- package/dist/src/utils/timeframe.utils.d.ts +6 -0
- package/dist/src/utils/timeframe.utils.d.ts.map +1 -0
- package/dist/src/utils/timeframe.utils.js +47 -0
- package/dist/src/utils/timeframe.utils.js.map +1 -0
- package/dist/src/utils/trendbar.utils.d.ts +7 -0
- package/dist/src/utils/trendbar.utils.d.ts.map +1 -0
- package/dist/src/utils/trendbar.utils.js +28 -0
- package/dist/src/utils/trendbar.utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/vitest.config.js +12 -0
- package/dist/vitest.config.js.map +1 -0
- package/package.json +48 -0
- package/src/classes/client.test.ts +100 -0
- package/src/classes/client.ts +102 -0
- package/src/classes/errors/client-not-connected.error.ts +7 -0
- package/src/classes/errors/connection.error.ts +7 -0
- package/src/classes/logger.ts +26 -0
- package/src/classes/managers/authentication/authentication.manager.test.ts +187 -0
- package/src/classes/managers/authentication/authentication.manager.ts +65 -0
- package/src/classes/managers/authentication/errors/application-auth.error.ts +9 -0
- package/src/classes/managers/authentication/errors/user-auth.error.ts +9 -0
- package/src/classes/managers/models/base.manager.ts +50 -0
- package/src/classes/managers/models/credentials.model.ts +15 -0
- package/src/classes/managers/symbols/errors/get-symbols-details.error.ts +9 -0
- package/src/classes/managers/symbols/errors/get-symbols-list.error.ts +9 -0
- package/src/classes/managers/symbols/errors/get-trend-bars.error.ts +7 -0
- package/src/classes/managers/symbols/errors/subscribe-live-trend-bars.error.ts +17 -0
- package/src/classes/managers/symbols/errors/subscribe-spot-events.error.ts +9 -0
- package/src/classes/managers/symbols/errors/unsubscribe-live-trend-bars.error.ts +9 -0
- package/src/classes/managers/symbols/symbols-updates.manager.ts +440 -0
- package/src/classes/managers/symbols/symbols.manager.test.ts +455 -0
- package/src/classes/managers/symbols/symbols.manager.ts +134 -0
- package/src/classes/models/client-configuration.model.ts +39 -0
- package/src/classes/models/ctrader-x-error.model.ts +16 -0
- package/src/config/config.ts +48 -0
- package/src/index.ts +4 -0
- package/src/models/common/ohlcv.ts +19 -0
- package/src/models/proto/base-proto.ts +13 -0
- package/src/models/proto/messages/authentication/ProtoOAAccountAuthReq.ts +8 -0
- package/src/models/proto/messages/authentication/ProtoOAAccountAuthRes.ts +3 -0
- package/src/models/proto/messages/authentication/ProtoOAApplicationAuthReq.ts +13 -0
- package/src/models/proto/messages/authentication/ProtoOAApplicationAuthRes.ts +3 -0
- package/src/models/proto/messages/common/ProtoOASubscribeSpotsReq.ts +6 -0
- package/src/models/proto/messages/common/ProtoOASubscribeSpotsRes.ts +3 -0
- package/src/models/proto/messages/symbols/ProtoOAGetTrendbarsReq.ts +29 -0
- package/src/models/proto/messages/symbols/ProtoOAGetTrendbarsRes.ts +30 -0
- package/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarReq.ts +7 -0
- package/src/models/proto/messages/symbols/ProtoOASubscribeLiveTrendbarRes.ts +3 -0
- package/src/models/proto/messages/symbols/ProtoOASymbolByIdReq.ts +8 -0
- package/src/models/proto/messages/symbols/ProtoOASymbolByIdRes.ts +15 -0
- package/src/models/proto/messages/symbols/ProtoOASymbolsListReq.ts +8 -0
- package/src/models/proto/messages/symbols/ProtoOASymbolsListRes.ts +14 -0
- package/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarReq.ts +11 -0
- package/src/models/proto/messages/symbols/ProtoOAUnsubscribeLiveTrendbarRes.ts +3 -0
- package/src/models/proto/models/ProtoOAArchivedSymbol.ts +21 -0
- package/src/models/proto/models/ProtoOAErrorRes.ts +20 -0
- package/src/models/proto/models/ProtoOAHoliday.ts +31 -0
- package/src/models/proto/models/ProtoOAInterval.ts +16 -0
- package/src/models/proto/models/ProtoOALightSymbol.ts +38 -0
- package/src/models/proto/models/ProtoOASpotEvent.ts +31 -0
- package/src/models/proto/models/ProtoOASymbol.ts +220 -0
- package/src/models/proto/models/ProtoOATrendbar.ts +11 -0
- package/src/models/proto/models/ProtoOATrendbarPeriod.ts +16 -0
- package/src/models/proto/payload-types/payload-types.enum.ts +77 -0
- package/src/utils/price.utils.ts +42 -0
- package/src/utils/sleep.utils.ts +13 -0
- package/src/utils/timeframe.utils.ts +50 -0
- package/src/utils/trendbar.utils.ts +59 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vitest.config.ts +11 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export enum OHLCVPositions {
|
|
2
|
+
TIME = 0,
|
|
3
|
+
OPEN = 1,
|
|
4
|
+
HIGH = 2,
|
|
5
|
+
LOW = 3,
|
|
6
|
+
CLOSE = 4,
|
|
7
|
+
VOLUME = 5,
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Used for final kline events
|
|
12
|
+
*
|
|
13
|
+
* Timestamp
|
|
14
|
+
* Open
|
|
15
|
+
* High
|
|
16
|
+
* Low
|
|
17
|
+
* Close
|
|
18
|
+
*/
|
|
19
|
+
export type OHLCV = [number, number, number, number, number, number];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class BaseProto {
|
|
2
|
+
/**
|
|
3
|
+
* Optional, for more details on which values to use, please visit:
|
|
4
|
+
* https://help.ctrader.com/open-api/model-messages/#protooaordertype
|
|
5
|
+
*/
|
|
6
|
+
payloadType?: number;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The unique identifier of the trader's account in cTrader platform.
|
|
10
|
+
* Used to match responses to trader's accounts.
|
|
11
|
+
*/
|
|
12
|
+
ctidTraderAccountId?: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseProto } from '../../base-proto';
|
|
2
|
+
|
|
3
|
+
export class ProtoOAApplicationAuthReq extends BaseProto {
|
|
4
|
+
/**
|
|
5
|
+
* The unique Client ID provided during the registration.
|
|
6
|
+
*/
|
|
7
|
+
clientId: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The unique Client Secret provided during the registration.
|
|
11
|
+
*/
|
|
12
|
+
clientSecret: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseProto } from '../../base-proto';
|
|
2
|
+
import { ProtoOATrendbarPeriod } from '../../models/ProtoOATrendbarPeriod';
|
|
3
|
+
|
|
4
|
+
export class ProtoOAGetTrendbarsReq extends BaseProto {
|
|
5
|
+
/**
|
|
6
|
+
* The Unix time in milliseconds from which the search starts. Must be bigger or equal to zero (1st Jan 1970).
|
|
7
|
+
*/
|
|
8
|
+
fromTimestamp?: number;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The Unix time in milliseconds of finishing the search. Smaller or equal to 2147483646000 (19th Jan 2038).
|
|
12
|
+
*/
|
|
13
|
+
toTimestamp?: number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Specifies period of trend bar series (e.g. M1, M10, etc.).
|
|
17
|
+
*/
|
|
18
|
+
period: ProtoOATrendbarPeriod;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier of the Symbol in cTrader platform.
|
|
22
|
+
*/
|
|
23
|
+
symbolId: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Limit number of trend bars in response back from toTimestamp.
|
|
27
|
+
*/
|
|
28
|
+
count?: number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseProto } from '../../base-proto';
|
|
2
|
+
import { ProtoOATrendbar } from '../../models/ProtoOATrendbar';
|
|
3
|
+
import { ProtoOATrendbarPeriod } from '../../models/ProtoOATrendbarPeriod';
|
|
4
|
+
|
|
5
|
+
export class ProtoOAGetTrendbarsRes extends BaseProto {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies period of trend bar series (e.g. M1, M10, etc.).
|
|
8
|
+
*/
|
|
9
|
+
period: ProtoOATrendbarPeriod;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Simply don't use this field, as your original request already contains toTimestamp
|
|
13
|
+
*/
|
|
14
|
+
timestamp?: number;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The list of trend bars.
|
|
18
|
+
*/
|
|
19
|
+
trendbar: ProtoOATrendbar[];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier of the Symbol in cTrader platform.
|
|
23
|
+
*/
|
|
24
|
+
symbolId?: number;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* If TRUE then the number of records by filter is larger than chunkSize, the response contains the number of records that is equal to chunkSize.
|
|
28
|
+
*/
|
|
29
|
+
hasMore?: boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseProto } from '../../base-proto';
|
|
2
|
+
import { ProtoOAArchivedSymbol } from '../../models/ProtoOAArchivedSymbol';
|
|
3
|
+
import { ProtoOASymbol } from '../../models/ProtoOASymbol';
|
|
4
|
+
|
|
5
|
+
export class ProtoOASymbolByIdRes extends BaseProto {
|
|
6
|
+
/**
|
|
7
|
+
* Symbols entities with the full set of fields.
|
|
8
|
+
*/
|
|
9
|
+
symbol: ProtoOASymbol[];
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Archived symbols
|
|
13
|
+
*/
|
|
14
|
+
archivedSymbol: ProtoOAArchivedSymbol[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseProto } from '../../base-proto';
|
|
2
|
+
import { ProtoOALightSymbol } from '../../models/ProtoOALightSymbol';
|
|
3
|
+
|
|
4
|
+
export class ProtoOASymbolsListRes extends BaseProto {
|
|
5
|
+
/**
|
|
6
|
+
* The list of symbols.
|
|
7
|
+
*/
|
|
8
|
+
symbol: ProtoOALightSymbol[];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The list of archived symbols.
|
|
12
|
+
*/
|
|
13
|
+
archivedSymbol: ProtoOALightSymbol[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseProto } from '../../base-proto';
|
|
2
|
+
import { ProtoOATrendbarPeriod } from '../../models/ProtoOATrendbarPeriod';
|
|
3
|
+
|
|
4
|
+
export class ProtoOAUnsubscribeLiveTrendbarReq extends BaseProto {
|
|
5
|
+
/**
|
|
6
|
+
* Set period to '*' to unsubscribe ALL the subscribers for any period on
|
|
7
|
+
* this symbolId
|
|
8
|
+
*/
|
|
9
|
+
period: ProtoOATrendbarPeriod | '*';
|
|
10
|
+
symbolId: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class ProtoOAArchivedSymbol {
|
|
2
|
+
/**
|
|
3
|
+
* The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
|
|
4
|
+
*/
|
|
5
|
+
symbolId: number;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Name of the symbol (e.g. EUR/USD).
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The Unix time in milliseconds of the last update of the symbol.
|
|
14
|
+
*/
|
|
15
|
+
utcLastUpdateTimestamp: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Description of the symbol.
|
|
19
|
+
*/
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseProto } from '../base-proto';
|
|
2
|
+
|
|
3
|
+
export class ProtoOAErrorRes extends BaseProto {
|
|
4
|
+
/**
|
|
5
|
+
* The name of the ProtoErrorCode or the other custom ErrorCodes (e.g. ProtoCHErrorCode).
|
|
6
|
+
*/
|
|
7
|
+
errorCode: string;
|
|
8
|
+
|
|
9
|
+
description?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The Unix time in seconds when the current maintenance session will be ended.
|
|
13
|
+
*/
|
|
14
|
+
maintenanceEndTimestamp?: number;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* When you hit rate limit with errorCode=BLOCKED_PAYLOAD_TYPE, this field will contain amount of seconds until related payload type will be unlocked.
|
|
18
|
+
*/
|
|
19
|
+
retryAfter?: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseProto } from '../base-proto';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Holiday period when trading is not available.
|
|
5
|
+
*/
|
|
6
|
+
export class ProtoOAHoliday extends BaseProto {
|
|
7
|
+
/**
|
|
8
|
+
* Holiday unique ID.
|
|
9
|
+
*/
|
|
10
|
+
holidayId: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Name of the holiday.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Description of the holiday.
|
|
19
|
+
*/
|
|
20
|
+
description?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Start timestamp of the holiday in milliseconds.
|
|
24
|
+
*/
|
|
25
|
+
startTimestamp: number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* End timestamp of the holiday in milliseconds.
|
|
29
|
+
*/
|
|
30
|
+
endTimestamp: number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseProto } from '../base-proto';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Trading interval/schedule for a symbol.
|
|
5
|
+
*/
|
|
6
|
+
export class ProtoOAInterval extends BaseProto {
|
|
7
|
+
/**
|
|
8
|
+
* Start time of the interval in seconds from the beginning of the week.
|
|
9
|
+
*/
|
|
10
|
+
startSecond: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* End time of the interval in seconds from the beginning of the week.
|
|
14
|
+
*/
|
|
15
|
+
endSecond: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export class ProtoOALightSymbol {
|
|
2
|
+
/**
|
|
3
|
+
* The unique identifier of the symbol in specific server environment within cTrader platform. Different brokers might have different IDs.
|
|
4
|
+
*/
|
|
5
|
+
symbolId: number;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Name of the symbol (e.g. EUR/USD).
|
|
9
|
+
*/
|
|
10
|
+
symbolName?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* If TRUE then symbol is visible for traders.
|
|
14
|
+
*/
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Base asset.
|
|
19
|
+
*/
|
|
20
|
+
baseAssetId?: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Quote asset.
|
|
24
|
+
*/
|
|
25
|
+
quoteAssetId?: number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Id of the symbol category used for symbols grouping.
|
|
29
|
+
*/
|
|
30
|
+
symbolCategoryId?: number;
|
|
31
|
+
|
|
32
|
+
description?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The number used for sorting Symbols in the UI (lowest number should appear at the top).
|
|
36
|
+
*/
|
|
37
|
+
sortingNumber?: number;
|
|
38
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseProto } from '../base-proto';
|
|
2
|
+
import { ProtoOATrendbar } from './ProtoOATrendbar';
|
|
3
|
+
|
|
4
|
+
export class ProtoOASpotEvent extends BaseProto {
|
|
5
|
+
symbolId: number;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Returns live trend bar. Requires subscription on the trend bars.
|
|
9
|
+
*/
|
|
10
|
+
trendbar: ProtoOATrendbar[];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Bid price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
|
|
14
|
+
*/
|
|
15
|
+
bid?: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Ask price. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
|
|
19
|
+
*/
|
|
20
|
+
ask?: number;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The Unix time for spot.
|
|
24
|
+
*/
|
|
25
|
+
timestamp?: number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Last session close. Specified in 1/100000 of unit of a price. (e.g. 123000 in protocol means 1.23, 53423782 means 534.23782)
|
|
29
|
+
*/
|
|
30
|
+
sessionClose?: number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { BaseProto } from '../base-proto';
|
|
2
|
+
import { ProtoOAHoliday } from './ProtoOAHoliday';
|
|
3
|
+
import { ProtoOAInterval } from './ProtoOAInterval';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Symbol entity with the full set of fields.
|
|
7
|
+
*/
|
|
8
|
+
export class ProtoOASymbol extends BaseProto {
|
|
9
|
+
/**
|
|
10
|
+
* The unique identifier of the symbol in specific server environment within cTrader platform.
|
|
11
|
+
* Different servers have different IDs.
|
|
12
|
+
*/
|
|
13
|
+
symbolId: number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Number of price digits to be displayed.
|
|
17
|
+
*/
|
|
18
|
+
digits: number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Pip position on digits.
|
|
22
|
+
*/
|
|
23
|
+
pipPosition: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* If TRUE then the short selling with the symbol is enabled.
|
|
27
|
+
*/
|
|
28
|
+
enableShortSelling?: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* If TRUE then setting of guaranteedStopLoss is available for limited risk accounts.
|
|
32
|
+
*/
|
|
33
|
+
guaranteedStopLoss?: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Day of the week when SWAP charge amount will be tripled. Doesn't impact Rollover Commission.
|
|
37
|
+
* Default: MONDAY
|
|
38
|
+
*/
|
|
39
|
+
swapRollover3Days?:
|
|
40
|
+
| 'MONDAY'
|
|
41
|
+
| 'TUESDAY'
|
|
42
|
+
| 'WEDNESDAY'
|
|
43
|
+
| 'THURSDAY'
|
|
44
|
+
| 'FRIDAY'
|
|
45
|
+
| 'SATURDAY'
|
|
46
|
+
| 'SUNDAY';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* SWAP charge for long positions.
|
|
50
|
+
*/
|
|
51
|
+
swapLong?: number;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* SWAP charge for short positions.
|
|
55
|
+
*/
|
|
56
|
+
swapShort?: number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Maximum allowed volume in cents for an order with a symbol.
|
|
60
|
+
*/
|
|
61
|
+
maxVolume?: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Minimum allowed volume in cents for an order with a symbol.
|
|
65
|
+
*/
|
|
66
|
+
minVolume?: number;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Step of the volume in cents for an order with a symbol.
|
|
70
|
+
*/
|
|
71
|
+
stepVolume?: number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Maximum allowed exposure for the symbol (in cents).
|
|
75
|
+
*/
|
|
76
|
+
maxExposure?: number;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Array of trading intervals (periods) available for the symbol.
|
|
80
|
+
*/
|
|
81
|
+
schedule?: ProtoOAInterval[];
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Commission base amount. Measured in 1/100000 of currency unit.
|
|
85
|
+
* @deprecated Use preciseTradingCommissionRate instead
|
|
86
|
+
*/
|
|
87
|
+
commission?: number;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Commission type.
|
|
91
|
+
*/
|
|
92
|
+
commissionType?:
|
|
93
|
+
| 'USD_PER_MIL_USD'
|
|
94
|
+
| 'USD_PER_LOT'
|
|
95
|
+
| 'PERCENTAGE'
|
|
96
|
+
| 'QUOTE_CCY_PER_LOT';
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Minimum commission amount. Measured in 1/100000 of currency unit.
|
|
100
|
+
* @deprecated Use preciseMinCommission instead
|
|
101
|
+
*/
|
|
102
|
+
minCommission?: number;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Minimum commission type.
|
|
106
|
+
*/
|
|
107
|
+
minCommissionType?: 'CURRENCY' | 'QUOTE_CURRENCY';
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Currency in which the minimum commission is specified.
|
|
111
|
+
*/
|
|
112
|
+
minCommissionAsset?: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Rollover commission amount. Measured in 1/100000 of currency unit.
|
|
116
|
+
*/
|
|
117
|
+
rolloverCommission?: number;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Day of the week when rollover commission will be charged three times.
|
|
121
|
+
*/
|
|
122
|
+
rolloverCommission3Days?:
|
|
123
|
+
| 'MONDAY'
|
|
124
|
+
| 'TUESDAY'
|
|
125
|
+
| 'WEDNESDAY'
|
|
126
|
+
| 'THURSDAY'
|
|
127
|
+
| 'FRIDAY'
|
|
128
|
+
| 'SATURDAY'
|
|
129
|
+
| 'SUNDAY';
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* If TRUE then SWAP charges will be applied on weekends.
|
|
133
|
+
*/
|
|
134
|
+
chargeSwapAtWeekends?: boolean;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Lot size of the symbol (volume in cents).
|
|
138
|
+
*/
|
|
139
|
+
lotSize?: number;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Distance type for setting SL/TP.
|
|
143
|
+
*/
|
|
144
|
+
distanceSetIn?: 'PIPS' | 'POINTS' | 'SYMBOL_DIGITS';
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Minimum distance for setting Stop Loss in specified units.
|
|
148
|
+
*/
|
|
149
|
+
slDistance?: number;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Minimum distance for setting Take Profit in specified units.
|
|
153
|
+
*/
|
|
154
|
+
tpDistance?: number;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Minimum distance for setting Guaranteed Stop Loss in specified units.
|
|
158
|
+
*/
|
|
159
|
+
gslDistance?: number;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Guaranteed Stop Loss charge. Measured in 1/100000 of currency unit.
|
|
163
|
+
*/
|
|
164
|
+
gslCharge?: number;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Type of distance unit for setting guaranteed stop loss.
|
|
168
|
+
*/
|
|
169
|
+
gslDistanceType?: 'PIPS' | 'POINTS' | 'SYMBOL_DIGITS';
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Symbol description.
|
|
173
|
+
*/
|
|
174
|
+
description?: string;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Number of consecutive days (holidays) when SWAP is skipped.
|
|
178
|
+
*/
|
|
179
|
+
skipRolloverDays?: number;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Time zone for the symbol's schedule.
|
|
183
|
+
*/
|
|
184
|
+
scheduleTimeZone?: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Precise trading commission rate. Measured in 1/100000000 of currency unit.
|
|
188
|
+
*/
|
|
189
|
+
preciseTradingCommissionRate?: number;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Precise minimum commission. Measured in 1/100000000 of currency unit.
|
|
193
|
+
*/
|
|
194
|
+
preciseMinCommission?: number;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Array of holiday periods when trading is not available.
|
|
198
|
+
*/
|
|
199
|
+
holiday?: ProtoOAHoliday[];
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Conversion fee rate for P&L. Measured in 1/100000000.
|
|
203
|
+
*/
|
|
204
|
+
pnlConversionFeeRate?: number;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* ID referencing a dynamic leverage entity.
|
|
208
|
+
*/
|
|
209
|
+
leverageId?: number;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Number of SWAP periods to skip.
|
|
213
|
+
*/
|
|
214
|
+
skipSWAPPeriods?: number;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Measurement units for the symbol (e.g., "oz" for gold).
|
|
218
|
+
*/
|
|
219
|
+
measurementUnits?: string;
|
|
220
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProtoOATrendbarPeriod } from './ProtoOATrendbarPeriod';
|
|
2
|
+
|
|
3
|
+
export class ProtoOATrendbar {
|
|
4
|
+
volume: number;
|
|
5
|
+
period?: ProtoOATrendbarPeriod;
|
|
6
|
+
low?: number;
|
|
7
|
+
deltaOpen?: number;
|
|
8
|
+
deltaClose?: number;
|
|
9
|
+
deltaHigh?: number;
|
|
10
|
+
utcTimestampInMinutes?: number;
|
|
11
|
+
}
|