Can not store data in ordinal-api from ordhook
I have a ordhook and ordinal API . i write docker compose.yml for API but when i run http://localhost:3456/ordinals/v1/brc-20/tokens the result is {"limit":20,"offset":0,"total":0,"results":[]} .please help me for this bug
hi @rafaelcr . this is my ordhook node running
@louisdv7192 can you share your API logs to see if it's receiving block data from ordhook correctly?
From your images, I suspect the API is not reaching ordhook. Make sure ORDHOOK_NODE_RPC_PORT matches the open port you have on ordhook (usually should be port 20456)
this is my Ordhook.toml
[storage]
working_dir = "ordhook"
The Http Api allows you to register / deregister
dynamically predicates.
Disable by default.
[http_api] http_port = 20456
[network] mode = "testnet" bitcoind_rpc_url = bitcoind_rpc_username = bitcoind_rpc_password =
Bitcoin block events can be received by Chainhook
either through a Bitcoin node's ZeroMQ interface,
or through the Stacks node. Zmq is being
used by default:
bitcoind_zmq_url = "tcp://172.17.0.1:18555"
but stacks can also be used:
stacks_node_rpc_url = "http://0.0.0.0:20443"
[resources] ulimit = 2048 cpu_core_available = 16 memory_available = 32 bitcoind_rpc_threads = 4 bitcoind_rpc_timeout = 15 expected_observers_count = 1
Disable the following section if the state
must be built locally
[snapshot] download_url = "https://archive.hiro.so/mainnet/ordhook/mainnet-ordhook-sqlite-latest"
[logs] ordinals_internals = true chainhook_internals = true
And this is my log in Ordinal-api
@louisdangw3 did you find a fix, I'm having the same issue
@louisdangw3 apologies for the delay in getting back to you here.
Are you running both containers on the same machine? I suggest you make the following changes to your API's ENV:
EXTERNAL_HOSTNAME: 127.0.0.1if both ordhook and API are running on the same machineORDHOOK_NODE_RPC_HOST: 127.0.0.1same as aboveORDHOOK_NODE_RPC_PORT: 20456this should equal your http_port setting in Ordhook.toml
Settings above will allow you to run service start in ordhook and have the API register the predicate for you. Keep in mind that ordhook accepts predicate registrations once it has caught up with bitcoin chain tip so you might have to wait a bit for that to happen before launching the API
Marking this as completed since the config updates have been shared. Feel free to reopen the issue if further issues appear.