๐ Create an unsigned transaction
Code samples
POST /api/v1/trx/transactions/create
curl -X POST 'https://settla.net/api/v1/trx/transactions/create' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"owner_address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
"to_address": "TN3W4H6rK2ce4vX9YnFQHwKENnHjoxb3m9",
"amount": 1000,
"visible": true
}'
Builds an unsigned TRX transfer. Nothing is signed, nothing is sent, and no key ever reaches the platform โ this is the first half of the recommended flow:
POST /api/v1/trx/transactions/createโ get the unsigned transaction; 2. signtxIDwith your own key, on your own side; 3.POST /api/v1/trx/transactions/broadcastโ submit the signed object. The body is forwarded verbatim to the node's/wallet/createtransactionand the node's answer is returned verbatim, so any field java-tron accepts works here. Passvisible: trueto use base58 (Tโฆ) addresses; without it the node expects hex (41โฆ).amountis in SUN โ 1 TRX = 1 000 000 SUN. This endpoint builds plain TRX transfers only; a TRC20 transfer needs/wallet/triggersmartcontract, which is not exposed here. Before signing, recomputetxIDyourself โ it is the SHA-256 of the bytes ofraw_data_hex, not of its hex text โ and refuse to sign if it differs from what the node returned. This is what protects you from a tampered transaction body. The transaction expires atexpiration(about a minute after creation) and must be broadcast before then.
Body parameter
{
"owner_address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
"to_address": "TN3W4H6rK2ce4vX9YnFQHwKENnHjoxb3m9",
"amount": 1000,
"visible": true
}
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| ยป owner_address | body | string | false | Sender. |
| ยป to_address | body | string | false | Recipient. |
| ยป amount | body | integer(int64) | false | Amount in SUN. |
| ยป visible | body | boolean | false | true if the addresses in this body are base58. Omit or set false to pass hex 41โฆ addresses. |
Example responses
200 Response
{
"txID": "e5c5e129f0cb41a6d29c18b060f9dbd6992025da1cc769485c06e3c373169b41",
"raw_data": {
"ref_block_bytes": "88f0",
"ref_block_hash": "ef8831affaead8f8",
"expiration": 1788333366000,
"contract": [
{
"type": "TransferContract",
"parameter": {
"type_url": "type.googleapis.com/protocol.TransferContract",
"value": {
"owner_address": "TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9",
"to_address": "TN3W4H6rK2ce4vX9YnFQHwKENnHjoxb3m9",
"amount": 1000
}
}
}
],
"timestamp": 1788333307556
},
"raw_data_hex": "0a0288f02208ef8831affaead8f840f0b5e68786345a66080112620a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412310a154182dd6b9966724ae2fdc79b416c7588da67ff1b3512154184716914c0fdf7110a44030d04d0c4923504d9cc18e80770a4ede2878634",
"visible": true
}
500 Response
{
"error": "Could not connect to TRX node."
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Unsigned transaction object | Inline |
| 500 | Internal Server Error | Could not connect to TRX node | Inline |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป txID | string | false | none | none |
| ยป raw_data | object | false | none | none |
| ยป raw_data_hex | string | false | none | The signable payload. txID is the SHA-256 of these bytes. |
| ยป signature | [string] | false | none | none |
| ยป ret | [object] | false | none | none |
| ยปยป contractRet | string | false | none | none |
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | none |
| ยป details | object | false | none | Present only on a few validation errors. |