Skip to content

Commit

Permalink
swift maker example subscribes to multiple markets
Browse files Browse the repository at this point in the history
  • Loading branch information
NourAlharithi committed Nov 12, 2024
1 parent 023edd2 commit 98e38bd
Showing 1 changed file with 35 additions and 0 deletions.
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 98e38bd

Please sign in to comment.