openbook-dex / openbook-v2

openbook-v2 monorepo, contains solana program and ts client
Other
165 stars 96 forks source link

Add `getBestBid` and `getBestAsk` functions to SDK #186

Open metaproph3t opened 1 year ago

metaproph3t commented 1 year ago

I know how to get this from on-chain (just call bookside.best_price()), but I don't know how to do this from client

this would help a lot in surfacing prices to end-users

mschneider commented 8 months ago

hey @metaproph3t can you check if the new sdk works for you? https://github.com/openbook-dex/openbook-v2/blob/9d7173a44412c7d8297bd0d24f3bb0909e81d608/ts/client/src/accounts/market.ts#L160-L162