APIs
API Enpoints
14 min
vaultapi vault is a collection of wallets on all the supported chains each vault has a set of policies for transfer, trade, and defi transactions get api/external/vaults/ returns a list of vaults the user has access to request none response list\[vault] sdk function get vaults(self) get api/external/vaults/{vaultid}/ request none response vault sdk function get vault by id(self, vault id str) > vault post api/external/vaults/ request { "vaultname" string, # should be unique "vaultsigners" optional\[list\[str]], # list of users ids to be added as signers, default value is all owners and admins in the account "vaultviewers" optional\[list\[str]], # list of users ids to be added as viewers "templateid" string # id of policy template to use for this vault } response vault notes vault generation happens async so it might take a few seconds to complete after the post request to create api vault object has a boolean flag `walletsgenerated` that can be monitored for this purpose sdk function create vault(self, data dict) > vault get api/external/vaults/{vaultid}/balances/ fetch vault balances request none response {assetsymbol {chain balance}} example { "eth" { "ethereum" "0 1", "arbitrum" "0 2" }, "usdc" { "solana" "100", "polygon" "200" } } post api/external/vaults/{vaultid}/update balances/ update vault balance from on chain/external sources like exchange, and return the updated balances request none response {assetsymbol {chain balance}} transactionapi get api/external/transactions/ request none required fields \["vaultid"] response list\[transaction] sdk function get transactions(self) > list\[transaction] get api/external/transactions/{transactionid}/ request none response transaction sdk function get transaction by id(self, transaction id str) > transaction post api/external/transactions/estimate fee/ get the estimated fee for a transfer transaction request { "sourceid string, # vault id or contact id "destinationid" string, # vault id or contact id "asset" string, "amount" string, "blockchain" string, "category" enum transactioncategory, # transactioncategory, should be "transfer" } response { "high" { "expectedfeeinasset" string, "asset" string, "expectedfeeinusd" string, "basefee" string, "priorityfee" string }, "medium" { "expectedfeeinasset" string, "asset" string, "expectedfeeinusd" string, "basefee" string, "priorityfee" string }, "low" { "expectedfeeinasset" string, "asset" string, "expectedfeeinusd" string, "basefee" string, "priorityfee" string }, } sdk function estimate fee( self, source id str, destination id str, amount str, asset str, chain str, ) post api/external/transactions/ transfer transaction request { "sourceid" string, # vault id or contact id "destinationid" string, # vault id or contact id "asset" string, "amount" string, "blockchain" string, "category" enum transactioncategory, # transactioncategory, should be "transfer" "externalid" string, # optional, set if you want to track the transaction should be unique "isautomation" bool # optional, set to true if the transaction is automation "executeat" string # optional, set the time when the transaction should be executed } response transaction sdk function create transfer transaction( self, source id str, destination id str, amount str, asset str, chain str, external id optional\[str] = none, is automation optional\[bool] = false, execute at optional\[str] = none, ) > transaction trade transaction create a new trade transaction step 1 get trade quotes post api/external/transactions/trade quote request { "vaultid" string, "fromasset" string, "toasset" string, "fromamount" string, "blockchain" string, "toblockchain" string, "slippage" string } response { "traderequestdata" traderequestdata, "traderesponsedatalist" \[traderesponsedata] # list of all available quotes } sdk function get trade quote( self, vault id str, from asset str, to asset str, from amount str, from chain str, to chain str, slippage str, ) > dict step 2 create a trade transaction traderesponsedata is one of the traderesponsedata quotes from the get trade quote response post api/external/transactions/ request { "vaultid" string, "traderequestdata" dict, # same as the traderequestdata from the get trade quote response "traderesponsedata" dict, # one of the traderesponsedata from the get trade quote response "category" enum transactioncategory, # transactioncategory, should be "swap" "blockchain" string, "externalid" string, # optional, set if you want to track the transaction should be unique } response transaction sdk function create trade transaction( self, vault id str, trade request data dict, trade response data dict, external id optional\[str] = none, ) > transaction contactapi get api/external/contacts/ request none response list\[contact] sdk function get contacts(self) get api/external/contacts/{contactid} request none response contact sdk function get contact(self, id) post api/external/contacts request { "name" str, "address" str, "blockchain" str, "tags" optional\[str] } response contact sdk function def create contact( self, name str, address str, chain str, tags optional\[list\[str]] = none, external id optional\[str] = none, )