All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- State: Add
getFundingInfo
, which returns aFundingInfo
object. (#127) - Cache:
MarkTwap
'sTwapInfo
is reworked: ohlc is now deprecated, andcumulAvg
represents the cumulative sum of the funding TWAP. (#127)
- Margin: Fix RealizedPnl decimals
- General: Add
createProvider
function
- State: fixed supply/borrow apy zero divisor check
- Margin: Added method to create ix for
placePerpOrder
, will do so for more instructions (#75)
- Margin: Replaced mark price with index price in liquidations related calculations (#70)
- Margin: Added Power Perps Support
- Margin: Removed cache as param for MarginWeb3 Functions
- Margin: Added liquidation calculations to MarginWeb3
- Margin: Added margin exists function to check if margin exists
- Margin: Added state & cache subscriptions
- Program: Add FillOrKill order type. Acts as an IoC which fails if not completely filled (#67)
- Margin: Margin now inherits MarginWeb3 which contains all the web3 logic related to fetching and loading
- Margin: now also contains math related logic for margin fractions calculation and other helper methods which can be use in liquidators & trading bots
- Margin: now also loads open orders for the account, and positions information
- State: now loads more detailed information about the markets & collaterals
- Cache: Fix mark cache's
lastSampleStartTime
decoding
- Events: Added
marginKey
toSwapLog
event
- Mainnet: Mainnet keys added
- Program:
createProgram
now takes aCluster
argument
- Margin: Added optional
owner
param toMargin.load()
- Fix: changed
cancelPerpOrder
null operator
- Fix: Update IDL
- Margin: Removed
cancelPerpOrderByClientId
and merged it intocancelPerpOrder
(#52) - BREAKING - Program: The old Zo devnet program
DuSPvazsfthvWRuJ8TUs984VXCeUfJ1qbzd8NwkRLEpd
, and Zo Dex devnet programCX8xiCu9uBrLX5v3DSeHX5SEvGT36PSExES2LmzVcyJd
is being decommissioned.
- Spot: Added and enabled swapping for SOL-USDC spot market
- BREAKING - Margin: Added payer to createMargin and createPerpOpenOrders so that PDA's can be authorities of margin accounts during CPIs (#51)
- Margin: Added reduceOnlyIoc and reduceOnlyLimit order types (#49)
- General: updated anchor to newer version and enabled commitment passing (#42)
- Fix: fixed decimal errors on some decoding (#42)
- Events: Added anchor events and decoder (#31)
- Changed serum-ts to lite-serum to remove unnecessary files (#29)
- Deposit/Withdraw: Now accepts a mint pubkey and deposits/withdraws directly to/from an associated token account
- Deposit/Withdraw: Old implementations of deposit/withdraw are repurposed as depositRaw/withdrawRaw in case users want to deposit/withdraw to/from a specific account
- Withdraw: Associated token account is created before withdrawal if such account does not exist
- Margin: Add an optional limit arg to placePerpOrder used when compute limit is reached
- Margin: ClientId can now be passed as an input to placePerpOrder to tag specific orders with a unique id, that can be used to cancel the order using the clientId
- Margin: New instruction cancelPerpOrderByClientId that cancels using the pre-assigned unique client id
- Margin: Swap method is now simplified. Takes in big units (like SOL and BTC) instead of smol units (like satoshis and lamports).
- Margin: Swap method now accepts a slippage parameter.
- Margin: PlacePerpOrder is now simplified. Takes in big units. No longer takes in maxQuoteQty.
- Life to this repo