Skip to content

Commit 02d8f8e

Browse files
authored
Merge pull request #292 from drift-labs/master
build fix
2 parents f4a708a + 2e46909 commit 02d8f8e

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

src/bots/jitMaker.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,18 @@ import dotenv from 'dotenv';
3535

3636
dotenv.config();
3737
import { PublicKey } from '@solana/web3.js';
38-
import { JitMakerConfig } from '../config';
38+
import { BaseBotConfig } from '../config';
39+
40+
export type JitMakerConfig = BaseBotConfig & {
41+
subaccounts?: Array<number>;
42+
marketType: string;
43+
/// @deprecated, use {@link JitMakerConfig.marketIndexes} and {@link JitMakerConfig.marketType}
44+
perpMarketIndicies?: Array<number>;
45+
marketIndexes?: Array<number>;
46+
targetLeverage?: number;
47+
aggressivenessBps?: number;
48+
jitCULimit?: number;
49+
};
3950

4051
/**
4152
* This is an example of a bot that implements the Bot interface.

src/experimental-bots/swift/makerExample.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,41 @@ export class SwiftMaker {
7474
market_name: 'SOL-PERP',
7575
})
7676
);
77+
ws.send(
78+
JSON.stringify({
79+
action: 'subscribe',
80+
market_type: 'perp',
81+
market_name: 'BTC-PERP',
82+
})
83+
);
84+
ws.send(
85+
JSON.stringify({
86+
action: 'subscribe',
87+
market_type: 'perp',
88+
market_name: 'ETH-PERP',
89+
})
90+
);
91+
ws.send(
92+
JSON.stringify({
93+
action: 'subscribe',
94+
market_type: 'perp',
95+
market_name: 'APT-PERP',
96+
})
97+
);
98+
ws.send(
99+
JSON.stringify({
100+
action: 'subscribe',
101+
market_type: 'perp',
102+
market_name: 'MATIC-PERP',
103+
})
104+
);
105+
ws.send(
106+
JSON.stringify({
107+
action: 'subscribe',
108+
market_type: 'perp',
109+
market_name: 'ARB-PERP',
110+
})
111+
);
77112
}
78113

79114
if (message['order'] && this.driftClient.isSubscribed) {

0 commit comments

Comments
 (0)