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. ```shell 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 ```shell 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 ```shell yarn run dev ```