All notable changes to this project will be documented in this file. Version changes are pinned to SDK releases.
- risk: Remove redundant calculation in
getMarginAccountState. (#59) - program-types: Add force halt pricing field to
Greeks. (#63) - examples: Fix cranking example. (#63)
- examples: Add example to display settlement prints. (#64)
- subscription: Add
subscriptionto allow for websocket subscription to all program accounts of a particular type. Currently only supportsMarginAccount. (#71) - examples: Add subscription example. (#71)
- examples: Added a cranking example that calls all of zeta's permissionless instructions with relevant documentation. (#47)
- risk: Added in new calculations for short put margin requirements. (#49)
- exchange: New margin parameter for MarginParameters account. (#49)
- exchange: Add new instruction to update admin. (#48)
- market: Add
getBidOrdersandgetAskOrdersfor market. (#50) - client: Add
initializeOpenOrdersAccountfor independent open orders account creation. (#50) - general: Add user keys to whitelist accounts. (#53)
- exchange: Add
expireSeriesOverrideinstruction. (#52)
- general: Rename margin parameters to be more intuitive from
optionBasetooptionDynamic. (#44) - exchange: Fix race condition on
Exchange.loadthat would result in NaN margin requirements temporarily. (#44) - events: Trade event now emits
orderIdandclientOrderIdif set, otherwise it is 0. These are represented in BN. (#45) - client: Deposit limit for non white-listed users. (#40)
- events: TradeEvent now emits
costOfTradesinstead ofprice. Users can useutils.getTradeEventPrice(event)to get the trade price. If your order was a taker and traded against multiple orders in the one insert, the TradeEvent will aggregate across each execution. As a result, the trade price returned is the average trade price across the total taker size. (#45) - events: TradeEvent size is now a BN. (#45)
- client: Users can only deposit up to a threshold where their balance + unrealized_pnl + new deposit < deposit limit unless they are previously whitelisted. Deposit limit can be found in the
Exchange.stateaccount. (#40)
- utils: bugfix - Floating point error in
convertDecimalToNativeInteger. (#43)
- client: bugfix -
client.orderssize is represented in Decimals. (#42)
- exchange: Add whitelist trading fees account initialization. (#24)
- client: Add whitelist trading functionality for reduced fees. (#24)
- general: Support new changes for socialized loss mechanism. (#25)
- client: Fix withdrawal instruction bug. (#25)
- general: Added typedoc documentation and github action for publishing to gh-pages. (#30)
- general: Changed pkg manager from npm to yarn. (#30)
- client: Add whitelist trading functionality for reduced fees. (#24)
- risk: Handle new margin calculation parameters being read from
ZetaGroup. (#31) - general: Move minting of dex tokens to place_order instead. (#33)
- client: Support client order ids for
PlaceOrderand addCancelOrderByClientOrderId. (#33) - client: Add client order id to
Order. (#33) - refactor: Replace program rpc calls with TransactionInstructions. (#34)
- general: Support platform halt functionality. (#34)
- general: Making lot size more minute in execution and tick sizes. (#35)
- utils : Add
convertNativeLotSizeToDecimalandconvertDecimalToNativeLotSizefor new lot size changes. (#35) - program-types:
MarginAccountfieldsposition,openingOrdersandclosingOrdersare now represented as a BN instead of number. (#35) - general: Add padding to
Greeks,MarginAccountandStateaccounts. (#35)
- general: Minimum price increment is now 0.0001 for both options and futures. (#35)
- general: Minimum trade tick size is now 0.001 for both options and futures. (#35)
- client:
placeOrder,liquidateandcancelAndPlaceOrdernow expect the native integer size as the argument for size. i.e. trading 1.000 options will require you to pass in 1_000 orconvertDecimalToNativeLotSize(1). (#35) - utils:
convertNativeBNToDecimalnow takes in an optional argument for the number of fixed point precision.
- npm: Fix issue with 0.8.2 package.
- constants: Migrate to new serum DEX pid to fix execution bug. (#21)
- market: Add helper functions for finding a market given parameters. (#9)
- client: Update client open orders address on callback for scenario where open orders address is initialized outside of the sdk. (#20)
- insurance-client: Insurance fund functionality, whitelist checks, deposit & withdrawal. (#9)
- exchange: Insurance functionality, whitelist a user, rebalance vaults. (#9)
- general: Add functionality to SDK to support on chain options pricing. (#11)
- anchor: Bump to Anchor v0.18.2 typescript. (#11)
- utils: refactor util functions for converting between numbers and BN. (#14)
- exchange: Add functionality to handle scenario where deployment fails and redeployment is required. (#14)
- risk: Fix mark price precision error in
RiskCalculatorfor margin calculations. (#15)
- utils: Deprecated
getNativeAmountandgetReadableAmountinsrc/utils.ts. This is replaced byconvertDecimalToNativeInteger,convertNativeIntegerToDecimal,convertNativeBNToDecimalinsrc/utils.ts. (#14) - client: Client position
costOfTradesare now represented in decimal instead of native fixed point integer. (#14) - exchange: Deprecated
Greeksaccounttheofield inProductGreeks. This is now replaced byExchange.greeks.markPrices[productIndex]. (#11)
Note: Skipped versions due to NPM issues.
- client: improve logging on deposit.
- client: throttle defaults to false instead of true.
- utils: improve display state.
- risk: add
getMarginAccountStateto risk calculator for general margin account state. - general: export anchor Wallet so it is accessible via this sdk.
- exchange: Load
throttleargument is nowthrottleMsfor the ms to throttle per set of markets polled.