Skip to main content
The Currency L1 node handles token transactions for a metagraph’s native currency. The transaction model is identical to DAG L1 transactions, but operates on metagraph tokens rather than $DAG. Currency L1 also supports fee estimation and token lock operations.
All endpoints return the following response headers:
  • X-Id — The node’s public key identifier
  • X-Session-Token — The current cluster session token
  • Request-Signature — Cryptographic signature of the response for verification
Building a valid transaction: Always call GET /transactions/last-reference/{address} before constructing a new transaction to get the correct parent.hash and parent.ordinal. The new transaction’s parent ordinal must be exactly lastOrdinal + 1.

Base URL

The Currency L1 API typically runs on port 9300 (metagraph nodes may use different ports).
https://<metagraph-l1-host>:9300

POST /transactions

Submits a signed metagraph currency transaction for processing.
curl -X POST https://<metagraph-l1-host>:9300/transactions \
  -H "Content-Type: application/json" \
  -d '{
    "value": {
      "source": "DAG3hZTBgtb2iH9ZdLNvaKqPT4ZncCuW6uYxZack",
      "destination": "DAG2rMPHX4w1cMMJowmewRMjD1in53yRURt6Eijh",
      "amount": 100000000,
      "fee": 0,
      "parent": {
        "hash": "",
        "ordinal": 0
      },
      "salt": 6018762703199813000
    },
    "proofs": [
      { "id": "<public-key-hex>", "signature": "<ecdsa-der-hex>" }
    ]
  }'
Request bodySignedTransaction
value
object
required
The currency transaction payload
proofs
array
required
Array of cryptographic signature proofs. Must be signed by the source address owner.
Response 200 OK
hash
string
Hash of the accepted transaction.
Response 400 Bad Request The transaction was rejected. Returns one of the following rejection reasons:
errors
array

POST /transactions/estimate-fee

Estimates the fee for a signed currency transaction without submitting it.
curl -X POST https://<metagraph-l1-host>:9300/transactions/estimate-fee \
  -H "Content-Type: application/json" \
  -d '{ "value": { ... }, "proofs": [ ... ] }'
Request body — Same as POST /transactions (SignedTransaction) Response 200 OK
hash
string
The estimated fee in the currency’s smallest unit

GET /transactions/

Returns the current view of a currency transaction in the L1 mempool.
curl https://<metagraph-l1-host>:9300/transactions/a1b2c3d4e5f6789012345678901234567890
hash
string
required
The transaction hash (hex-encoded SHA-256)
Response 200 OK
transaction
object
The full transaction data
hash
string
The transaction hash
status
string
Current status in the mempool. Currently: Waiting
Response 400 Bad Request No transaction with the given hash found in the mempool.

GET /transactions/last-reference/

Returns the last accepted currency transaction reference for a given address.
curl https://<metagraph-l1-host>:9300/transactions/last-reference/DAG3hZTBgtb2iH9ZdLNvaKqPT4ZncCuW6uYxZack
address
string
required
Wallet address to query
Response 200 OK
ordinal
integer
Ordinal of the last accepted currency transaction. Use ordinal + 1 for the next transaction’s parent ordinal.
hash
string
Hash of the last accepted currency transaction. Returns empty string "" if no prior transactions exist.
Example response:
{
  "ordinal": 7,
  "hash": "a1b2c3d4e5f6789012345678901234567890"
}

Token Lock Endpoints

The Currency L1 node also supports token lock operations, identical to the DAG L1 Token Locks API.

POST /token-locks

Submits a signed token lock transaction for the metagraph currency.
curl -X POST https://<metagraph-l1-host>:9300/token-locks \
  -H "Content-Type: application/json" \
  -d '{ "value": { ... }, "proofs": [ ... ] }'
Same request/response schema as DAG L1 POST /token-locks.

GET /token-locks/

Returns a token lock view from the currency L1 mempool.
curl https://<metagraph-l1-host>:9300/token-locks/a1b2c3d4e5f6...
Same schema as DAG L1 GET /token-locks/{hash}.

GET /token-locks/last-reference/

Returns the last token lock reference for use as a parent in new token lock requests.
curl https://<metagraph-l1-host>:9300/token-locks/last-reference/DAG3hZTBgtb2iH9ZdLNvaKqPT4ZncCuW6uYxZack
Same schema as DAG L1 GET /token-locks/last-reference/{address}.

Build docs developers (and LLMs) love