feat: add useDemoTrading flag to BaseRestClient for demo mode support
This commit is contained in:
@@ -92,6 +92,7 @@ export default abstract class BaseRestClient {
|
||||
constructor(
|
||||
restOptions: RestClientOptions = {},
|
||||
networkOptions: AxiosRequestConfig = {},
|
||||
useDemoTrading: boolean = false,
|
||||
) {
|
||||
this.options = {
|
||||
recvWindow: 5000,
|
||||
@@ -110,6 +111,7 @@ export default abstract class BaseRestClient {
|
||||
'X-CHANNEL-API-CODE': 'hbnni',
|
||||
'Content-Type': 'application/json',
|
||||
locale: 'en-US',
|
||||
...(useDemoTrading ? { paptrading: '1' } : {}),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user