Use Cases
Integrate Dashboard Features

Integrate Dasboard Features in your App

ℹ️

Estimated feature integration time: ~2 hours*

Prerequisites

The following steps are required. If you haven't done so already, please follow the steps in the prerequisites guide:

  • Implement logic for extension detection and connection
  • Implement logic for vaults & accounts selection
  • Subscribe to cede.store events
  1. Retrieve balances from our Provider API and display to the user:
const balances = await provider.request({
  method: "balances",
  params: {
    vaultId: "740351-125805-530845-212023-888168",
    accountIds: ["binance-530845-212023-888168", "coinbase-125805-530845-212023"],
  },
});
console.log({ balances });
 
// {
//   "binance-530845-212023-888168": {
//     "USDT": {
//       "freeBalance": 5780,
//       "refFreeBalance": 1200,
//       "usedBalance": 0,
//       "refUsedBalance": 0,
//       "totalBalance": 5780,
//       "refTotalBalance": 1200,
//       "spot": {
//         "freeBalance": 270,
//         "refFreeBalance": 40,
//         "usedBalance": 0,
//         "refUsedBalance": 0,
//         "totalBalance": 270,
//         "refTotalBalance": 40,
//         "originalWalletName": "spot"
//       },
//       "margin": {
//         "freeBalance": 270,
//         "refFreeBalance": 40,
//         "usedBalance": 0,
//         "refUsedBalance": 0,
//         "totalBalance": 270,
//         "refTotalBalance": 40,
//         "originalWalletName": "margin"
//       }
//     }
//   }
// }
  1. Retrieve transaction history from our Provider API and display to the user:
const transactions = await provider.request({
  method: "transactions",
  params: {
    vaultId: "740351-125805-530845-212023-888168",
    accountIds: ["coinbase-125805-530845-212023"],
  },
});
console.log({ transactions });
 
// [
//   {
//     from: {
//       account: {
//         address: "0x6cBED1830F5693Fa1a7A38e9870Cf4Ae5170dec4",
//         network: "unknown",
//       },
//       transaction: {
//         fee: {
//           amount: 0,
//           tokenSymbol: "MATIC",
//         },
//         status: "ok",
//         timestamp: 1693688542000,
//         tokens: [
//           {
//             address: "unknown",
//             amount: 8.1,
//             tokenSymbol: "MATIC",
//           },
//         ],
//         transactionHash: "unknown",
//       },
//     },
//     to: {
//       account: {
//         accountId: "coinbase-125805-530845-212023",
//         exchangeId: "coinbase",
//       },
//       transaction: {
//         amount: 8.1,
//         fee: {
//           amount: 0,
//           tokenSymbol: "MATIC",
//         },
//         status: "ok",
//         timestamp: 1693688542000,
//         tokenSymbol: "MATIC",
//         transactionId: "0290fb51-f76b-5b52-a20a-dbc45fa9b71a",
//       },
//       wallet: {
//         depositAddress: "unknown",
//         walletType: "spot",
//       },
//     },
//     type: "deposit",
//   },
// ];

* The estimated integration time is for a project that already has UI components for a similar DeFi deposit feature.