| Crates.io | zeta-abi |
| lib.rs | zeta-abi |
| version | 0.1.1 |
| created_at | 2023-02-22 05:27:55.149462+00 |
| updated_at | 2023-02-22 08:25:14.035909+00 |
| description | Zeta DEX ABI |
| homepage | https://github.com/zetamarkets/zeta-abi |
| repository | https://github.com/zetamarkets/zeta-abi |
| max_upload_size | |
| id | 791413 |
| size | 64,595 |
ABI is Zeta's cross-program integration ecosystem.
This repository contains the Zeta Cross Program Invocation (CPI) interface as well as a usage example abi-wrapper.
The instructions currently supported are as follows:
initialize_margin_account - create and initialize a user's margin accountinitialize_open_orders - create and initialize user's open orders accountdeposit - deposit USDC collateral into the margin accountwithdraw - withdraw USDC collateral from the margin accountplace_order_v4 - place a futures order of (price, size, side) on the relevant marketplace_perp_order_v2 - place a perp order of (price, size, side) on the relevant marketcancel_order_xxx - collection of order cancellation functions, by orderId, clientOrderId, market, etcclose_open_orders - close open orders accountliquidate - trigger liquidationThe accounts and relevant data that is currently supported (non-exhaustive):
ZetaGroup - contains information relating to all derivatives market for an underlying
Greeks
MarginAccount
Basic usage example outlined in a dummy wrapper program, which simply calls the main zeta program instructions. Also includes account layouts and outlines how to read all relevant on-chain data from the Zeta program. This should give all the boilerplate needed to execute core program functionality both as the smart contract and off-chain client.