-
Notifications
You must be signed in to change notification settings - Fork 0
Adding RWA Assets
To configure sourcing Real-World Assets (RWAs) data for the decentralized feeder, please set the following environment variables:
Important
This setup requires a separate .env file and a DIA Lasernet wallet if you're already running an exchange pair feeder.
Note
- For the
NODE_OPERATOR_NAME=var, use your existing node operator name followed by-rwa(e.g.dia-rwa). - Use the
.env.examplefor the exact env variables to set. -
BLOCKCHAIN_NODE=&BACKUP_NODE=can point to the same RPC URL. You can find the DIA RPC URLs here. - To get the full list of supported RWA assets, visit this page.
SOURCE=TwelveData
# Node operator configuration (MUST be filled by node operators)
# for latest image versions see https://hub.docker.com/r/diadata/decentralized-data-feeder/tags
PRIVATE_KEY=
NODE_OPERATOR_NAME=""
DEPLOYED_CONTRACT=""
BLOCKCHAIN_NODE=""
BACKUP_NODE=""
IMAGE_TAG=""
# Monitoring
PUSHGATEWAY_USER=
PUSHGATEWAY_PASSWORD=
PUSHGATEWAY_URL=
# Chain configuration
# https://github.com/diadata-org/decentral-data-feeder/wiki/Chain-Info
CHAIN_ID=
UPDATE_SECONDS=80
The variable specific to the RWA feeder is:
-
SOURCE=: The data source (e.g. TwelveData)
As of the latest release, RWA asset lists are configured in a JSON file, not via environment variables.
Update the file and the feeder will hot-reload it periodically.
-
Config file path (inside container):
/config/rwa/rwaConfig.json -
Hot-reload period:
CONFIG_UPDATE_SECONDS(default86400seconds) -
Schema:
{
"Stocks": ["MSFT", "AAPL", "NVDA"],
"FX": ["USD/NGN", "USD/EUR", "USD/JPY"],
"Commodities": ["XAU/USD", "XAGG/USD", "WTI/USD"],
"ETF": ["IVV", "URTH", "QQQ", "IBIT"]
}- Notes:
-
STOCK_SYMBOLS: A comma-separated list of stock tickers to scrape (e.g.AAPL,MSFT). -
FX_TICKERS: A comma-separated list of fiat currency pairs in the format<Base>/<Quote>(e.g.USD/NGN,USD/EUR). -
COMMODITIES: A comma-separated list of commodity pairs in the format<Commodity>/<Quote>(e.g.XAU/USD,XAGG/USD). -
ETF: A comma-separated list of ETF tickers (e.g.IVV,URTH).
Deprecated: Do not set STOCK_SYMBOLS, FX_TICKERS, COMMODITIES, or ETF as environment variables. They have been replaced by the JSON configuration.
To configure the SOURCE environment variable for your deployment method, locate the environment configuration file or section for your deployment method:
- For Docker Compose: Use the
.envfile or add directly to thedocker-compose.yamlfile. - For Kubernetes: Update the Kubernetes manifest file
manifest.yaml - For Docker Run: Pass the variable directly using the
-eflag.
- Example:
services:
app:
image: diadata/decentralized-data-feeder:<VERSION>
# for latest image versions see https://hub.docker.com/r/diadata/decentralized-data-feeder/tags
env_file:
- .env
environment:
- SOURCE=TwelveData
# Optional: override reload interval (seconds)
- CONFIG_UPDATE_SECONDS=86400
restart: always- Example:
spec:
containers:
- name: feeder-container
image: diadata/decentralized-data-feeder:<VERSION>
env:
- name: PRIVATE_KEY
value: "myprivatekey"
- name: DEPLOYED_CONTRACT
value: "0x..."
- name: SOURCE
value: "TwelveData"
ports:
- containerPort: 8080- Example:
docker run -d \
-e NODE_OPERATOR_NAME=my-name \
-e PRIVATE_KEY=your-private-key \
-e DEPLOYED_CONTRACT=your-contract \
-e SOURCE="TwelveData" \
--name decentralized-feeder \
diadata/decentralized-data-feeder:<VERSION>If you have a docker-compose setup,
-
Open a terminal in the
docker-composefolder and start the deployment by running:bash docker-compose upThe logs will display the deployed contract address for your RWA feeder in the following format:│ time="2024-11-25T11:30:08Z" level=info msg="Contract pending deploy: 0xxxxxxxxxxxxxxxxxxxxxxxxxx." -
Copy the displayed contract address (e.g.,
0xxxxxxxxxxxxxxxxxxxxxxxxxx) and stop the container withdocker rm -f <container_name>. -
Update your
.envfile withDEPLOYED_CONTRACTvariable mentioned above. Redeployed the container withdocker-compose up -dDEPLOYED_CONTRACT=0xxxxxxxxxxxxxxxxxxxxxxxxxx
For instructions on retrieving the deployed smart contract in alternative setups, please refer to the main feeder Wiki.
- Docker Compose: Check logs with
docker-compose logs -f
- Kubernetes: Check pod logs
kubectl logs <pod-name>
- Docker Run: View logs with
docker logs <container-name>
- The output should look like:
app-1 | time="2025-08-19T05:59:23Z" level=info msg="Executing ETF data update for 19 symbols"
app-1 | time="2025-08-19T05:59:24Z" level=info msg="got rwa data: {URTH iShares MSCI World ETF 175.6 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:24Z" level=info msg="got rwa data: {EEM iShares MSCI Emerging Markets ETF 50.235 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:24Z" level=info msg="got rwa data: {VOO Vanguard S&P 500 ETF 591.44 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:25Z" level=info msg="got rwa data: {SPY SPDR S&P 500 ETF Trust 643.2901 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:25Z" level=info msg="got rwa data: {VTI Vanguard Total Stock Market ETF 316.54001 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:25Z" level=info msg="got rwa data: {QQQ Invesco QQQ Trust 577.099976 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:25Z" level=info msg="got rwa data: {IBIT iShares Bitcoin Trust 66.044998 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:26Z" level=info msg="got rwa data: {FBTC Fidelity Wise Origin Bitcoin Index Fund 101.47 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:26Z" level=info msg="got rwa data: {ARKB Ark 21Shares Bitcoin ETF 38.66 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:26Z" level=info msg="got rwa data: {HODL VanEck Bitcoin ETF 32.91 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
app-1 | time="2025-08-19T05:59:26Z" level=info msg="got rwa data: {GBTC Grayscale Bitcoin Trust (BTC) 91.4 2025-08-18 19:59:00 +0000 UTC false false ETF TwelveData}"
.
.