Transaction Operator
The transaction operator allows transactions to be submitted over REST without specifying a nonce. The system will ensure that the next nonce is correctly specified, and that transactions are re-submitted in case of timeouts or other node errors. Submission is idempotent as long as the same transaction id is used.

Usage:

This API can be used with any app wallet credentials that request the eth_sign scope. (Chain id 1 is mainnet, 4 is rinkeby, etc).
Curl example:
1
$ curl -X POST -H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json" -d '{
2
"transaction": {
3
"id": "932018a0-3091-4323-ba80-e2145badc174",
4
"params": {
5
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
6
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
7
"gas": "0x76c0",
8
"gasPrice": "0x9184e72a000",
9
"value": "0x9184e72a",
10
"data": "0x0"
11
}
12
}
13
}' https://api.bitski.com/v1/eth/chains/1/transactions
14
15
=>
16
{
17
"transaction": {
18
"id": "932018a0-3091-4323-ba80-e2145badc174",
19
"params": {
20
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
21
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
22
"gas": "0x76c0",
23
"gasPrice": "0x9184e72a000",
24
"value": "0x9184e72a",
25
"data": "0x0",
26
"nonce": "0x01",
27
},
28
"status": "PENDING",
29
"hash": "0x68fcfcf5aef8e7a79b8d6b7e498415896e4dd62861cd5b38fa11ad035f44582c",
30
"signedData": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
31
"lastError": null
32
}
33
}
Copied!

Polling for updates:

Transactions are queued and submitted out of band (status will be PENDING, SUBMITTED, or ERROR). In order to see the status of a submitted transaction, all transactions can be queried, or a single transaction can be specified by id:
1
$ curl -H "Authorization: Bearer <ACCESS_TOKEN>" https://api.bitski.com/v1/eth/chains/1/transactions
2
3
=>
4
{
5
"transactions": [{
6
"id": "932018a0-3091-4323-ba80-e2145badc174",
7
"params": {
8
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
9
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
10
"gas": "0x76c0",
11
"gasPrice": "0x9184e72a000",
12
"value": "0x9184e72a",
13
"data": "0x0",
14
"nonce": "0x01",
15
},
16
"status": "PENDING",
17
"hash": "0x68fcfcf5aef8e7a79b8d6b7e498415896e4dd62861cd5b38fa11ad035f44582c",
18
"signedData": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
19
"lastError": null
20
}]
21
}
22
23
# Or by id
24
$ curl -H "Authorization: Bearer <ACCESS_TOKEN>" https://api.bitski.com/v1/eth/chains/1/transactions/932018a0-3091-4323-ba80-e2145badc174
25
26
=>
27
{
28
"transaction": {
29
"id": "932018a0-3091-4323-ba80-e2145badc174",
30
"params": {
31
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
32
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
33
"gas": "0x76c0",
34
"gasPrice": "0x9184e72a000",
35
"value": "0x9184e72a",
36
"data": "0x0",
37
"nonce": "0x01",
38
},
39
"status": "PENDING",
40
"hash": "0x68fcfcf5aef8e7a79b8d6b7e498415896e4dd62861cd5b38fa11ad035f44582c",
41
"signedData": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
42
"lastError": null
43
}
44
}
Copied!

Current Limitations:

    Transactions that do not have a high enough gas price will not automatically have the gas price adjusted, so if gas prices spike, the transaction will remain in the queue until prices return to a low enough level. Alternatively a new transaction can be submitted with that same nonce via the standard JSON RPC api to increase the gas price and flush the transaction through.
    Transactions that cannot be submitted to the mempool could consume a nonce but be stuck getting retried forever. There are many checks to prevent this, but no guarantees.
    gas and gasPrice are not currently overridden, and must be provided by the caller.
Last modified 5mo ago