# Get Raw Bitcoin Transaction Hex

This endpoint returns the raw hex for a given Bitcoin transaction. It supports confirmed and unconfirmed transactions.

## GET /v1/bitcoin/tx/{txid}/hex

> Retrieve transaction hex. Supports confirmed and unconfirmed transactions.

```json
{"openapi":"3.0.3","info":{"title":"SecretKeyLabs API","version":"1.0.0"},"tags":[{"name":"Bitcoin"}],"servers":[{"url":"https://api.secretkeylabs.io"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"x-api-key","in":"header"}}},"paths":{"/v1/bitcoin/tx/{txid}/hex":{"get":{"tags":["Bitcoin"],"description":"Retrieve transaction hex. Supports confirmed and unconfirmed transactions.","parameters":[{"schema":{"format":"regex","pattern":"^[a-fA-F0-9]{64}$","type":"string"},"in":"path","name":"txid","required":true,"description":"Transaction id"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"description":"Invalid input","type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"Unauthorized","type":"string"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"description":"Not found","type":"string"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"description":"Rate limit exceeded","type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"description":"Internal server error","type":"string"}}}}}}}}}
```
