Sui · Example Payload

Coins

BlockchainMoveWeb3CryptocurrencySmart Contracts

Coins is an example object payload from Sui, with 5 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

suix_getAllBalancessuix_getAllCoinssuix_getBalancesuix_getCoinMetadatasuix_getCoins

Example Payload

Raw ↑
{
  "suix_getAllBalances": {
    "method": "suix_getAllBalances",
    "request": {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "suix_getAllBalances",
      "params": [
        "0x94f1a597b4e8f709a396f7f6b1482bdcd65a673d111e49286c527fab7c2d0961"
      ]
    },
    "response": {
      "jsonrpc": "2.0",
      "id": 1,
      "result": [
        {
          "coinType": "0x2::sui::SUI",
          "coinObjectCount": 15,
          "totalBalance": "3000000000",
          "lockedBalance": {},
          "fundsInAddressBalance": "42"
        }
      ]
    }
  },
  "suix_getAllCoins": {
    "method": "suix_getAllCoins",
    "request": {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "suix_getAllCoins",
      "params": [
        "0x41f5975e3c6bd5c95f041a8493ad7e9934be26e69152d2c2e86d8a9bdbd242b3",
        "0x2564cd31a71cf9833609b111436d8f0f47b7f8b9927ec3f8975a1dcbf9b25564",
        3
      ]
    },
    "response": {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "data": [
          {
            "coinType": "0x2::sui::SUI",
            "coinObjectId": "0x861c5e055605b2bb1199faf653a8771e448930bc95a0369fad43a9870a2e5878",
            "version": "103626",
            "digest": "Ao1QyN9UTmYzb2ead3D5xhSBk7TvACRvmnJW8gRbwP99",
            "balance": "200000000",
            "previousTransaction": "7dp5WtTmtGp83EXYYFMzjBJRFeSgR67AzqMETLrfgeFx"
          },
          {
            "coinType": "0x2::sui::SUI",
            "coinObjectId": "0x7e769678d059761bff8a8f3944642e4c33a6e4fb0b55f8face36fadaa22f2a0d",
            "version": "103626",
            "digest": "5taVxHU9QLQD5cNdqxt8kNGAab93GMG4vX7zYDxEaohx",
            "balance": "200000000",
            "previousTransaction": "9xLdMXezY8d1yRA2TtN6pYjapyy2EVKHWNriGPFGCFvd"
          },
          {
            "coinType": "0x2::sui::SUI",
            "coinObjectId": "0xa323d541ba5cf9e34919d2644cda38a263f69f47ae954dec65295231e0d2c7c8",
            "version": "103626",
            "digest": "82ZNKSSueWUQkpFNbBZGHSr3sUL5Rxfr7ucVRsvgQzz2",
            "balance": "200000000",
            "previousTransaction": "5xexWFq6QpGHBQyC9P2cbAJXq9qm2EjzfuRM9NwS1uyG"
          }
        ],
        "nextCursor": "abcd",
        "hasNextPage": true
      }
    }
  },
  "suix_getBalance": {
    "method": "suix_getBalance",
    "request": {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "suix_getBalance",
      "params": [
        "0xa6f5a7953a75dc632e696cabe60560522a017bf2fb0bd930d1ec22c06f1ee4e4",
        "0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC"
      ]
    },
    "response": {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "coinType": "0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC",
        "coinObjectCount": 15,
        "totalBalance": "15",
        "lockedBalance": {},
        "fundsInAddressBalance": "42"
      }
    }
  },
  "suix_getCoinMetadata": {
    "method": "suix_getCoinMetadata",
    "request": {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "suix_getCoinMetadata",
      "params": [
        "0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC"
      ]
    },
    "response": {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "decimals": 9,
        "name": "Usdc",
        "symbol": "USDC",
        "description": "Stable coin.",
        "iconUrl": null,
        "id": "0x51ceab2edc89f74730e683ebee65578cb3bc9237ba6fca019438a9737cf156ae"
      }
    }
  },
  "suix_getCoins": {
    "method": "suix_getCoins",
    "request": {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "suix_getCoins",
      "params": [
        "0x6d907beaa3a49db57bdfdb3557e6d405cbf01c293a53e01457d65e92b5d8dd68",
        "0x2::sui::SUI",
        "0xee6b5173afedb35330f60397c2cbb48196ba41921246c304be7b490cee0904eb",
        3
      ]
    },
    "response": {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "data": [
          {
            "coinType": "0x2::sui::SUI",
            "coinObjectId": "0xd62ca040aba24f862a763851c54908cd2a0ee7d709c11b93d4a2083747b76856",
            "version": "103626",
            "digest": "C9fdokK19BpDCgUgWsJv3cfd4LDyk7WGYBeGhFHbEL2Z",
            "balance": "200000000",
            "previousTransaction": "tw5DzJTfdxTn4f3rekFrhN7dQTUezBgsEhycDobTBLb"
          },
          {
            "coinType": "0x2::sui::SUI",
            "coinObjectId": "0xf44d295a385dc3544d211411b865e8bc4f01f49186970c7cf61e1cc829cc0be7",
            "version": "103626",
            "digest": "5qZkmtN5J5uGHURtiy9BtBhnXATPR2Wa6BJBDLrMzCaf",
            "balance": "200000000",
            "previousTransaction": "AfgFe7ZfjJ5dWV6VAy2LbtvBFhcABkvdvwEjLrRcFqtr"
          },
          {
            "coinType": "0x2::sui::SUI",
            "coinObjectId": "0x42ef9314ccc792dd4401a88e69c66b4c5e43f21e9e57f4abe3c702649d3a7dd0",
            "version": "103626",
            "digest": "FLE2nB2Wio3oUyTx6HyzkrMsWiZxDg9Kk8s7ivvuoBbD",
            "balance": "200000000",
            "previousTransaction": "9er6jxigfuQEKsn9gtPV2oW1zGQRcFtKNijHVe88GUJD"
          }
        ],
        "nextCursor": "abcd",
        "hasNextPage": true
      }
    }
  }
}