diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..0ef8c0c2 --- /dev/null +++ b/404.html @@ -0,0 +1,408 @@ + + + +
+ + + + + + + + + + + + + + +These functions are used to retrieve specific on-chain accounts (State, PerpMarket, SpotMarket, etc.)
+drift_client= DriftClient.from_config(config, provider)
+
+# get sol market info
+sol_market_index = 0
+sol_market = await get_perp_market_account(drift_client.program, sol_market_index)
+print(
+ sol_market.amm.sqrt_k,
+ sol_market.amm.base_asset_amount_long,
+ sol_market.amm.base_asset_amount_short,
+)
+
+# get usdc spot market info
+usdc_spot_market_index = 0
+usdc_market = await get_spot_market_account(drift_client.program, usdc_spot_market_index)
+print(
+ usdc.market_index,
+ usdc.deposit_balance,
+ usdc.borrow_balance,
+)
+
{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Ha=/["'&<>]/;Nn.exports=$a;function $a(e){var t=""+e,r=Ha.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i