suix_getCoinMetadata RPC Method
Parameters
coinType
string
REQUIRED
Loading...
Returns
result
object
Loading...
decimals
integer
Loading...
name
string
Loading...
symbol
string
Loading...
description
string
Loading...
iconUrl
string
Loading...
id
string
Loading...
Request
1curl --location 'https://docs-demo.sui-mainnet.quiknode.pro/' \2--header 'Content-Type: application/json' \3--data '{4"jsonrpc": "2.0",5"id": 1,6"method": "suix_getCoinMetadata",7"params": [8"0x2::sui::SUI"9]10}'
1curl --location 'https://docs-demo.sui-mainnet.quiknode.pro/' \2--header 'Content-Type: application/json' \3--data '{4"jsonrpc": "2.0",5"id": 1,6"method": "suix_getCoinMetadata",7"params": [8"0x2::sui::SUI"9]10}'
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"jsonrpc": "2.0",6"id": 1,7"method": "suix_getCoinMetadata",8"params": [9"0x2::sui::SUI"10]11});1213const requestOptions = {14method: "POST",15headers: myHeaders,16body: raw,17redirect: "follow"18};1920fetch("https://docs-demo.sui-mainnet.quiknode.pro/", requestOptions)21.then((response) => response.text())22.then((result) => console.log(result))23.catch((error) => console.error(error));
1const myHeaders = new Headers();2myHeaders.append("Content-Type", "application/json");34const raw = JSON.stringify({5"jsonrpc": "2.0",6"id": 1,7"method": "suix_getCoinMetadata",8"params": [9"0x2::sui::SUI"10]11});1213const requestOptions = {14method: "POST",15headers: myHeaders,16body: raw,17redirect: "follow"18};1920fetch("https://docs-demo.sui-mainnet.quiknode.pro/", requestOptions)21.then((response) => response.text())22.then((result) => console.log(result))23.catch((error) => console.error(error));
1import requests2import json34url = "https://docs-demo.sui-mainnet.quiknode.pro/"56payload = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "suix_getCoinMetadata",10"params": [11"0x2::sui::SUI"12]13})14headers = {15'Content-Type': 'application/json'16}1718response = requests.request("POST", url, headers=headers, data=payload)1920print(response.text)21
1import requests2import json34url = "https://docs-demo.sui-mainnet.quiknode.pro/"56payload = json.dumps({7"jsonrpc": "2.0",8"id": 1,9"method": "suix_getCoinMetadata",10"params": [11"0x2::sui::SUI"12]13})14headers = {15'Content-Type': 'application/json'16}1718response = requests.request("POST", url, headers=headers, data=payload)1920print(response.text)21
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sui-mainnet.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "suix_getCoinMetadata",16"params": [17"0x2::sui::SUI"18]19})2021response = https.request(request)22puts response.read_body23
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sui-mainnet.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Content-Type"] = "application/json"12request.body = JSON.dump({13"jsonrpc": "2.0",14"id": 1,15"method": "suix_getCoinMetadata",16"params": [17"0x2::sui::SUI"18]19})2021response = https.request(request)22puts response.read_body23
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free