Skip to main content

GetCurrency

Retrieves a single currency by its numeric ID or trading code.

Request

GET /nxt?requestType=get-currency

Parameters

NameTypeDescriptionRequired
currencylongCurrency numeric IDOptional
codestringCurrency trading code (e.g., "MYC")Optional
includeCountsbooleanInclude transfer/payment countsOptional
includeDeletedbooleanInclude deleted currenciesOptional

Notes

  • Exactly one of currency (ID) or code (code) must be provided
  • If code is provided, includeDeleted must be true to retrieve deleted currencies
  • Both currency and code cannot 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

FieldTypeDescription
currencystringCurrency ID
issuerstringIssuer account ID
issuerRSstringIssuer account in NXT format
namestringCurrency name
codestringCurrency trading code
descriptionstringCurrency description
typeintCurrency type bitmask
chainintBeta chain ID
initialSupplyQNTstringInitial supply amount
currentSupplyQNTstringCurrent circulating supply
maxSupplyQNTstringMaximum supply
transactionLimitQNTstringPer-transaction limit
dailyLimitQNTstringDaily transfer limit
creationHeightintCurrency creation block height
issuanceHeightintActivation block height
minDifficultyintMinimum minting difficulty
maxDifficultyintMaximum minting difficulty
algorithmbyteMinting algorithm
decimalsbyteDivisibility
typesarrayArray of CurrencyType strings
numberOfTransfersintTotal transfer count (if includeCounts=true)
numberOfPaymentsintTotal payment count (if includeCounts=true)

Example

# Get currency by ID
curl "http://localhost:22024/nxt?requestType=get-currency&currency=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"