General Endpoints
Get the perpetual parameters
Query the parameters for the perpetual module by running;
parameters = trader.query.perp.params()
Get the list of open markets to trade on
You can query all the virtual pools by running:
markets = trader.query.vpool.all_pools()
Get the price in quote of a denom
You can get the current price fo the base in quote by running:
trader.query.vpool.base_asset_price("ubtc:unusd", Side.BUY, "10000")
Get the current position for a trader and a token pair
You can get information about your current position by running:
trader.query.perp.position(
pair="ubtc:unusd",
trader=trader.address
)