# Createrawtransaction

## createrawtransaction

> Creates an unsigned raw transaction from a list of inputs and outputs.\
> The transaction is returned as a serialized hex string, which can then be signed and broadcast.<br>

```json
{"openapi":"3.0.0","info":{"title":"BlockBook RES-API","version":"1.0.0"},"servers":[{"url":"https://btc-testnet.nownodes.io"}],"security":[{"api-keyAuth":[]}],"components":{"securitySchemes":{"api-keyAuth":{"type":"apiKey","in":"header","name":"api-key"}},"schemas":{"CreateRawTransactionRequest":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"type":"string"},"id":{"type":"string"},"method":{"type":"string","enum":["createrawtransaction"]},"params":{"type":"array","minItems":2,"maxItems":4,"description":"Parameters:\n1. `inputs` (array) — List of transaction inputs, each including `txid` and `vout`.\n2. `outputs` (object) — Destination addresses and amounts.\n3. `locktime` (integer, optional) — Locktime value.\n4. `replaceable` (boolean, optional) — Whether this transaction signals BIP125 replaceability.\n","items":{"oneOf":[{"type":"array","items":{"type":"object","properties":{"txid":{"type":"string","description":"Transaction ID to spend"},"vout":{"type":"integer","description":"Output index"}}}},{"type":"object","additionalProperties":{"type":"number"}},{"type":"integer"},{"type":"boolean"}]}}}},"CreateRawTransactionResponse":{"type":"object","properties":{"result":{"type":"string","description":"Raw transaction as hex-encoded string"},"error":{"type":"object","nullable":true,"description":"Null if successful; otherwise error information"},"id":{"type":"string","description":"The ID of the original request"}}}}},"paths":{"/":{"post":{"tags":["createrawtransaction"],"summary":"createrawtransaction","description":"Creates an unsigned raw transaction from a list of inputs and outputs.\nThe transaction is returned as a serialized hex string, which can then be signed and broadcast.\n","operationId":"createrawtransaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRawTransactionRequest"}}}},"responses":{"200":{"description":"Unsigned raw transaction created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRawTransactionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"string"}}}}}}}}}
```
