/build/rpc / assets / registry
getassetbyticker
getassetbyticker "ticker" Lookup an asset by its consensus ticker. Arguments: 1. ticker (string, required) Ticker (A-Z0-9, 3..11) Result: { (json object) "asset_id" : "hex", (string) asset id "ticker" : "str", (string) ticker symbol "decimals" : n (numeric) decimal places } Examples: > bitcoin-cli getassetbyticker ABC
Signature
getassetbyticker(ticker: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"getassetbyticker","params":["\"<ticker>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| ticker | string | yes | Ticker (A-Z0-9, 3..11) |
Result
Type: any
{ (json object) "asset_id" : "hex", (string) asset id "ticker" : "str", (string) ticker symbol "decimals" : n (numeric) decimal places }
Source: services/core-node/bcore/src/rpc/rawtransaction.cpp:1251
C++ symbol: getassetbyticker