Skip to main content
POST
/
lending-stocks
/
api
/
markets
/
{marketId}
/
sync-oracle
curl -X POST "https://api.trusset.org/lending-stocks/api/markets/{marketId}/sync-oracle" \
  -H "X-API-Key: trusset_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"price": 186.25}'
{
  "success": true,
  "data": {
    "previousPrice": "185.500000",
    "newPrice": "186.25",
    "txHash": "0xabc...def"
  }
}
Pushes a new price to the on-chain oracle. If no price is provided in the request body, the API fetches the current market price automatically using the configured stock symbol. Requires the relayer signer to be authorized on the oracle contract.
This is a write operation that submits a blockchain transaction. The relayer signer must be authorized on the oracle by its owner.

Path Parameters

marketId
string
required
Market ID.

Body Parameters

price
number
Price in USD. If omitted, the API fetches it from the configured price feed.
curl -X POST "https://api.trusset.org/lending-stocks/api/markets/{marketId}/sync-oracle" \
  -H "X-API-Key: trusset_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"price": 186.25}'
{
  "success": true,
  "data": {
    "previousPrice": "185.500000",
    "newPrice": "186.25",
    "txHash": "0xabc...def"
  }
}