Submit transaction
Submit a signed transaction
application/json
Request Body required
tx object
type Type of transaction request, for example ASYNC, meaning the transaction will be submitted and not block on a response
Possible values: [TYPE_UNSPECIFIED
, TYPE_ASYNC
, TYPE_SYNC
, TYPE_COMMIT
]
Responses
- 200
- default
A successful response.
application/json
Schema
Example (from schema)
Schema
code int64
data Data for details
height int64
log string
success Success will be true if the transaction was accepted by the node,
**Important** - success does not mean that the event is confirmed by consensus
txHash Hash of the transaction, if accepted
{
"code": 0,
"data": "string",
"height": "string",
"log": "string",
"success": true,
"txHash": "string"
}
An unexpected error response.
application/json
Schema
Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
POST /transaction
Request
Request
curl / cURL
curl -L -X POST 'https://n06.testnet.vega.xyz/transaction' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tx": {
"address": "string",
"inputData": "string",
"pow": {
"nonce": "string",
"tid": "string"
},
"pubKey": "string",
"signature": {
"algo": "string",
"value": "string",
"version": 0
},
"version": "TX_VERSION_UNSPECIFIED"
},
"type": "TYPE_UNSPECIFIED"
}'
python / requests
curl -L -X POST 'https://n06.testnet.vega.xyz/transaction' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tx": {
"address": "string",
"inputData": "string",
"pow": {
"nonce": "string",
"tid": "string"
},
"pubKey": "string",
"signature": {
"algo": "string",
"value": "string",
"version": 0
},
"version": "TX_VERSION_UNSPECIFIED"
},
"type": "TYPE_UNSPECIFIED"
}'
go / native
curl -L -X POST 'https://n06.testnet.vega.xyz/transaction' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tx": {
"address": "string",
"inputData": "string",
"pow": {
"nonce": "string",
"tid": "string"
},
"pubKey": "string",
"signature": {
"algo": "string",
"value": "string",
"version": 0
},
"version": "TX_VERSION_UNSPECIFIED"
},
"type": "TYPE_UNSPECIFIED"
}'
nodejs / axios
curl -L -X POST 'https://n06.testnet.vega.xyz/transaction' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tx": {
"address": "string",
"inputData": "string",
"pow": {
"nonce": "string",
"tid": "string"
},
"pubKey": "string",
"signature": {
"algo": "string",
"value": "string",
"version": 0
},
"version": "TX_VERSION_UNSPECIFIED"
},
"type": "TYPE_UNSPECIFIED"
}'