GetCurrency
Retrieves a single currency by its numeric ID or trading code.
Request
GET /nxt?requestType=get-currency
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
currency | long | Currency numeric ID | Optional |
code | string | Currency trading code (e.g., "MYC") | Optional |
includeCounts | boolean | Include transfer/payment counts | Optional |
includeDeleted | boolean | Include deleted currencies | Optional |
Notes
- Exactly one of
currency(ID) orcode(code) must be provided - If
codeis provided,includeDeletedmust be true to retrieve deleted currencies - Both
currencyandcodecannot be provided simultaneously
Response
{
"currency": "987654321",
"issuer": "1234567890",
"issuerRS": "NXT-abcd-efgh-ijkl",
"name": "MyCoin",
"code": "MYC",
"description": "My custom currency",
"type": 4,
"chain": 1,
"initialSupplyQNT": "100000000000",
"currentSupplyQNT": "95000000000",
"maxSupplyQNT": "100000000000",
"transactionLimitQNT": "5000000000",
"dailyLimitQNT": "1000000000",
"creationHeight": 100,
"issuanceHeight": 150,
"minDifficulty": 1,
"maxDifficulty": 255,
"algorithm": 0,
"decimals": 8,
"types": ["EXCHANGEABLE"],
"numberOfTransfers": 1500,
"numberOfPayments": 3200
}
Response Fields Description
| Field | Type | Description |
|---|---|---|
currency | string | Currency ID |
issuer | string | Issuer account ID |
issuerRS | string | Issuer account in NXT format |
name | string | Currency name |
code | string | Currency trading code |
description | string | Currency description |
type | int | Currency type bitmask |
chain | int | Beta chain ID |
initialSupplyQNT | string | Initial supply amount |
currentSupplyQNT | string | Current circulating supply |
maxSupplyQNT | string | Maximum supply |
transactionLimitQNT | string | Per-transaction limit |
dailyLimitQNT | string | Daily transfer limit |
creationHeight | int | Currency creation block height |
issuanceHeight | int | Activation block height |
minDifficulty | int | Minimum minting difficulty |
maxDifficulty | int | Maximum minting difficulty |
algorithm | byte | Minting algorithm |
decimals | byte | Divisibility |
types | array | Array of CurrencyType strings |
numberOfTransfers | int | Total transfer count (if includeCounts=true) |
numberOfPayments | int | Total payment count (if includeCounts=true) |
Example
# Get currency by ID
curl "http://localhost:22024/nxt?requestType=get-currency¤cy=987654321"
# Get currency by code
curl "http://localhost:22024/nxt?requestType=get-currency&code=MYC&includeCounts=true"
# Get currency with deleted currencies enabled
curl "http://localhost:22024/nxt?requestType=get-currency&code=MYC&includeDeleted=true"