Skip to content

Commit

Permalink
Merge pull request #292 from drift-labs/master
Browse files Browse the repository at this point in the history
build fix
  • Loading branch information
NourAlharithi authored Nov 12, 2024
2 parents f4a708a + 2e46909 commit 02d8f8e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/bots/jitMaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,18 @@ import dotenv from 'dotenv';

dotenv.config();
import { PublicKey } from '@solana/web3.js';
import { JitMakerConfig } from '../config';
import { BaseBotConfig } from '../config';

export type JitMakerConfig = BaseBotConfig & {
subaccounts?: Array<number>;
marketType: string;
/// @deprecated, use {@link JitMakerConfig.marketIndexes} and {@link JitMakerConfig.marketType}
perpMarketIndicies?: Array<number>;
marketIndexes?: Array<number>;
targetLeverage?: number;
aggressivenessBps?: number;
jitCULimit?: number;
};

/**
* This is an example of a bot that implements the Bot interface.
Expand Down
35 changes: 35 additions & 0 deletions src/experimental-bots/swift/makerExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,41 @@ export class SwiftMaker {
market_name: 'SOL-PERP',
})
);
ws.send(
JSON.stringify({
action: 'subscribe',
market_type: 'perp',
market_name: 'BTC-PERP',
})
);
ws.send(
JSON.stringify({
action: 'subscribe',
market_type: 'perp',
market_name: 'ETH-PERP',
})
);
ws.send(
JSON.stringify({
action: 'subscribe',
market_type: 'perp',
market_name: 'APT-PERP',
})
);
ws.send(
JSON.stringify({
action: 'subscribe',
market_type: 'perp',
market_name: 'MATIC-PERP',
})
);
ws.send(
JSON.stringify({
action: 'subscribe',
market_type: 'perp',
market_name: 'ARB-PERP',
})
);
}

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

0 comments on commit 02d8f8e

Please sign in to comment.