2023-05-25 10:02:31 -07:00
2023-05-23 12:40:57 -07:00
2023-05-23 12:41:05 -07:00
2023-05-23 12:40:57 -07:00
2023-05-23 12:40:57 -07:00
2023-05-23 12:40:57 -07:00
2023-05-23 12:40:57 -07:00
2023-05-25 10:02:31 -07:00
2023-05-23 12:40:57 -07:00
2023-05-23 12:40:57 -07:00
2023-05-25 10:02:31 -07:00

DLOB Serverfor Drift Protocol v2

Docs Discord Chat License

Run the example client

Modify the variables at the top of example/client.ts to match your environment.

yarn run example

dlob orders count: 38
maxSlot from DLOB init orders: 165107666
Initialized DLOb from server
DLOB for market 0:
Asks
[13] limit 21
[12] limit 20.32
[11] limit 17.73
[10] limit 15.63
[9] limit 15.32
[8] limit 14.35
[7] limit 14.32
[6] limit 14.3
[5] limit 14.23
[4] limit 14.2
[3] vAMMNode 13.896583
[2] limit 13.896194
[1] triggerMarket 0
Bids
[0] limit 13.879792
[1] vAMMNode 13.771213
[2] limit 13.37
[3] limit 13
[4] limit 13
[5] limit 12.45
[6] limit 12
[7] limit 10.37
[8] limit 10
[9] limit 9.97
[10] limit 9.42
[11] limit 9
[12] limit 8.89
[13] limit 8

Setting up

Setup Environment

cp .env.example .env

Update values in .env accordingly

  • ANCHOR_PRIVATE_KEY: can be a number array (as in example), or a path to a keypair.json as generated by solana-keygen, it needs to be an initialized user in order to load DriftClient.
  • ENV should be a drift env: devnet or mainnet-beta

Run

yarn run dev
Description
No description provided
Readme 2.2 MiB
Languages
TypeScript 89.8%
HTML 6.8%
Shell 3%
JavaScript 0.2%
Dockerfile 0.2%