> For the complete documentation index, see [llms.txt](https://docs.skylinebridge.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skylinebridge.tech/oracle-api/oraclestate.md).

# OracleState

## Get unspent transaction outputs of bridging addresses on specific chain

> Returns all unspent transaction outputs of bridging addresses for the given chain ID. Each UTXO includes the address it belongs to, along with amount and other relevant data.

```json
{"openapi":"3.1.1","info":{"title":"Oracle API","version":"1.0"},"servers":[{"url":"/api"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-API-Key","type":"apiKey"}},"schemas":{"OracleStateResponse":{"properties":{"chainID":{"description":"Chain ID","type":"string"},"hash":{"description":"Latest block hash","type":"string"},"slot":{"description":"Latest block slot","type":"integer"},"utxos":{"description":"Unspent transaction outputs","items":{"$ref":"#/components/schemas/CardanoChainConfigUtxo"},"type":"array"}},"type":"object"},"CardanoChainConfigUtxo":{"properties":{"address":{"description":"Output address","type":"string"},"amount":{"description":"Amount of currency","type":"integer"},"id":{"description":"Transaction hash","items":{"type":"integer"},"type":"array"},"index":{"description":"Output index","type":"integer"},"slot":{"description":"Output slot","type":"integer"},"tokens":{"description":"List of tokens including their name, policy ID, and amount","items":{"$ref":"#/components/schemas/wallet.TokenAmount"},"type":"array"}},"type":"object"},"wallet.TokenAmount":{"properties":{"nam":{"description":"Human-readable name of the token","type":"string"},"pid":{"description":"Hexadecimal hash of the monetary policy script","type":"string"},"val":{"description":"Quantity of the token","type":"integer"}},"type":"object"},"ErrorResponse":{"properties":{"err":{"type":"string"}},"type":"object"}}},"paths":{"/OracleState/Get":{"get":{"description":"Returns all unspent transaction outputs of bridging addresses for the given chain ID. Each UTXO includes the address it belongs to, along with amount and other relevant data.","parameters":[{"schema":{"type":"string"},"description":"Chain ID","in":"query","name":"chainId","required":true}],"responses":{"200":{"description":"OK - Returns Oracle state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OracleStateResponse"}}}},"400":{"description":"Bad Request – chainId is missing from the query or invalid, or the transaction outputs could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized – API key missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get unspent transaction outputs of bridging addresses on specific chain","tags":["OracleState"]}}}}
```

## Get transaction failure status

> Returns whether the transaction failed. A transaction is considered failed if it is not found on Oracle and if its TTL has expired.

```json
{"openapi":"3.1.1","info":{"title":"Oracle API","version":"1.0"},"servers":[{"url":"/api"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-API-Key","type":"apiKey"}},"schemas":{"HasTxFailedResponse":{"properties":{"failed":{"description":"true if the transaction failed, false otherwise","type":"boolean"}},"type":"object"},"ErrorResponse":{"properties":{"err":{"type":"string"}},"type":"object"}}},"paths":{"/OracleState/GetHasTxFailed":{"get":{"description":"Returns whether the transaction failed. A transaction is considered failed if it is not found on Oracle and if its TTL has expired.","parameters":[{"schema":{"type":"string"},"description":"Source chain ID","in":"query","name":"chainId","required":true},{"schema":{"type":"string"},"description":"Source transaction hash","in":"query","name":"txHash","required":true},{"schema":{"type":"string"},"description":"Transaction TTL","in":"query","name":"ttl","required":true}],"responses":{"200":{"description":"OK - Returns transaction failure status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HasTxFailedResponse"}}}},"400":{"description":"Bad Request – One or more query parameters are missing or invalid, or the transaction could not be retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized – API key missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get transaction failure status","tags":["OracleState"]}}}}
```
