# Spark Orderbook Contract Rust SDK The Spark Orderbook Contract SDK designed for Spark Market contract communication. There are a set of transactional methods such as `deploy`, register/unregister owner methods and `markets` getter method. Given below a detailed explanation of every contract method. ## OrderbookContract Type ```rust pub struct OrderbookContract { instance: Orderbook, } ``` ## Transactional MarketContract Owner Methods ### Contract Deployment ```rust pub async fn deploy(owner: WalletUnlocked) -> anyhow::Result ``` Deploys a new orderbook contract with given owner. `owner` The owner of the orderbook contract that manages market list. Returns a new instance of OrderbookContract type. ### Register Market ```rust pub async fn register_market(&self, market: ContractId) -> anyhow::Result> ``` Registers a new market by owner. `self` The MarketContract instance. `market` The market contract id. Returns a call result ### Unregister Market ```rust pub async fn unregister_market(&self, market: ContractId) -> anyhow::Result> ``` Unregisters a market by owner. `self` The MarketContract instance. `market` The market contract id. Returns a call result ## OrdebookContract Getter Methods ### Markets Info ```rust pub async fn markets( &self, assets: Vec<(AssetId, AssetId)>, ) -> anyhow::Result) ``` Retrieves user account inforamtion. `self` The MarketContract instance. `assets` The asset pair array [(base_asst_id, quote_asset_id)]. Returns an asset pair and optional market contract id array