Create transaction request

post/api/v2/wallet/{walletId}/txrequests

Allows users to create a transaction request given they have spender permissions on the wallet. Use only with MPC wallets. For multisignature wallets, use Build a transaction.

Path Parameters

  • walletIdstringRequired
    The ID of the wallet
    Example: 59cd72485007a239fb00282ed480da1f
    Pattern: ^[0-9a-f]{32}$
    Min length: >= 1 characters

Request Body

apiVersion string
Full or Light to differentiate between the different transaction request flows.
Allowed values: lite full
idempotencyKey string
The combination of the idempotencyKey, version and walletId has to be unique. If no idempotencyKey is specified then it remains undefined for the txRequest. Note, version is an internal field that is auto incremented on every update to a txRequest.
intent object required
intentType string required
The type of the intent
Allowed values: payment transferToken consolidate consolidateToken fanout stake unstake delegate undelegate switchValidator claim stakeClaimRewards pledge voteDelegation vote createAccount updateAccount addTrustLine removeTrustLine signMessage signTypedStructuredData enableToken authorize acceleration fillNonce walletRecovery contractCall deactivate customTx closeAssociatedTokenAccount stakeWithCallData unstakeWithCallData switchValidatorWithCallData feeAddressTransfer tokenApproval transferStake validatorRegistration increaseStake decreaseStake signalExit withdrawStake spotTransfer bridgeFunds enableBridging goUnstake createBtcDelegation transferAccept transferReject transferAcknowledge transferOfferWithdrawn cosignDelegationProposal cosignDelegationAccept defi-deposit defi-redeem delegateResource undelegateResource export import importtoc
comment string
Only visible to users on the wallet and not shared publicly
sequenceId string
A unique wallet identifier applied to transfers and transactions at creation
nonceOne of
The nonce of the transaction
videoApprovers array[string]
(Custodial) Specify who should perform the Video ID with Trust if one should be required.
preview boolean
When set to true, the transaction request is returned without being stored in the DB.

200 Response

One of
intentOne of
The intent of the transaction request
unspents array[string]
intentType string required
Must be "consolidate".
Allowed value: consolidate
receiveAddress string required
Destination address for consolidated funds. Must be a wallet-owned address.
senderAddressIndex number
Index of the wallet address to use as the sender.
consolidateId string
Opaque identifier used to correlate consolidation requests.
recipients array[object]
Token recipients for token consolidation flows.
keepAlive boolean
When true, leaves a small amount in the source address to keep it alive.
nonceOne of
Override the on-chain nonce for this transaction.
unsignedTxs array[object]
Holds all unsigned transactions that will be used to fulfill the TxRequest for MPC wallets.
parsedTx object required
serializedTxHex string required
The unsigned transaction as a hex string.
signableHex string required
The portion of a transaction used to generate a signature (may or may not be the same as serializedTxHex) as a hex string.
derivationPath string
A bip32 path.
coinSpecific object
Coin specific information.
feeInfo object
signatureShares array[object]
Only used for MPC coins. This is used to collect signature shares from and exchange them with the user.
vssProof string
The VSS proof of the signature share
privateShareProof string
The private share proof
publicShare string
The public share
from string required
The source of the signature share.
Allowed values: user backup bitgo
to string required
The recipient of the signature share.
Allowed values: user backup bitgo
share string required
The signature share
commitmentShares array[object]
Only used for MPC coins on EdDSA curve. This is used to collect commitment shares from and exchange them with the user.
type string required
The type of the commitment share
Allowed value: commitment
from string required
The source of the commitment share
Allowed values: user backup bitgo
Example: user
to string required
The recipient of the commitment share.
Allowed values: user backup bitgo
Example: bitgo
share string required
The commitment share.
txHashes array[string]
The hashes of all transactions from the TxRequest that have been signed and are pending broadcast.
apiVersion string
The API version of the transaction request
Allowed values: lite full
txRequestId string <uuid>required
A unique ID for the TxRequest document across all wallets. The combination of the txRequestId and version will always be unique.
Example: 123e4567-e89b-12d3-a456-426614174000
idempotencyKey string
The idempotency key of the transaction request
walletId string required
The id of the Wallet the TxRequest is for.
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
walletType string
The type describes who owns the keys to the wallet associated to the TxRequest.
Allowed values: backing cold custodial custodialPaired hot advanced trading
version number required
The version of the transaction request
enterpriseId string
If the wallet that owns the TxRequest is owned by an enterprise then this is the Id of said enterprise.
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
state string required
Allowed values: pendingApproval canceled rejected initialized pendingDelivery delivered pendingUserSignature pendingUserCommitment pendingUserRShare pendingUserGShare readyToSend signed failed
date string <date-time>required
The date and time this version of the TxRequest document was created.
Example: 2021-01-01T00:00:00.000Z
createdDate string <date-time>required
The date and time the version 1 TxRequest document was created.
Example: 2021-01-01T00:00:00.000Z
userId string required
The Id of the User that produced this version of the TxRequest document. Could have created a new document or updated an existing document.
initiatedBy string required
The Id of the User that originally created the TxRequest document (initiated the TxRequest).
updatedBy string required
The Id of the User that last updated the TxRequest document. This is an alias for the userId field.
intents array required
pendingApprovalId string
The id of the Pending Approval that was created for the TxRequest if one was required.
policiesChecked boolean
latest boolean required
Indicates if this is the latest transaction request
isCanceled boolean
True, if the transaction request is canceled.

201 Response

One of
intentOne of
The intent of the transaction request
unspents array[string]
intentType string required
Must be "consolidate".
Allowed value: consolidate
receiveAddress string required
Destination address for consolidated funds. Must be a wallet-owned address.
senderAddressIndex number
Index of the wallet address to use as the sender.
consolidateId string
Opaque identifier used to correlate consolidation requests.
recipients array[object]
Token recipients for token consolidation flows.
keepAlive boolean
When true, leaves a small amount in the source address to keep it alive.
nonceOne of
Override the on-chain nonce for this transaction.
unsignedTxs array[object]
Holds all unsigned transactions that will be used to fulfill the TxRequest for MPC wallets.
parsedTx object required
serializedTxHex string required
The unsigned transaction as a hex string.
signableHex string required
The portion of a transaction used to generate a signature (may or may not be the same as serializedTxHex) as a hex string.
derivationPath string
A bip32 path.
coinSpecific object
Coin specific information.
feeInfo object
signatureShares array[object]
Only used for MPC coins. This is used to collect signature shares from and exchange them with the user.
vssProof string
The VSS proof of the signature share
privateShareProof string
The private share proof
publicShare string
The public share
from string required
The source of the signature share.
Allowed values: user backup bitgo
to string required
The recipient of the signature share.
Allowed values: user backup bitgo
share string required
The signature share
commitmentShares array[object]
Only used for MPC coins on EdDSA curve. This is used to collect commitment shares from and exchange them with the user.
type string required
The type of the commitment share
Allowed value: commitment
from string required
The source of the commitment share
Allowed values: user backup bitgo
Example: user
to string required
The recipient of the commitment share.
Allowed values: user backup bitgo
Example: bitgo
share string required
The commitment share.
txHashes array[string]
The hashes of all transactions from the TxRequest that have been signed and are pending broadcast.
apiVersion string
The API version of the transaction request
Allowed values: lite full
txRequestId string <uuid>required
A unique ID for the TxRequest document across all wallets. The combination of the txRequestId and version will always be unique.
Example: 123e4567-e89b-12d3-a456-426614174000
idempotencyKey string
The idempotency key of the transaction request
walletId string required
The id of the Wallet the TxRequest is for.
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
walletType string
The type describes who owns the keys to the wallet associated to the TxRequest.
Allowed values: backing cold custodial custodialPaired hot advanced trading
version number required
The version of the transaction request
enterpriseId string
If the wallet that owns the TxRequest is owned by an enterprise then this is the Id of said enterprise.
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
state string required
Allowed values: pendingApproval canceled rejected initialized pendingDelivery delivered pendingUserSignature pendingUserCommitment pendingUserRShare pendingUserGShare readyToSend signed failed
date string <date-time>required
The date and time this version of the TxRequest document was created.
Example: 2021-01-01T00:00:00.000Z
createdDate string <date-time>required
The date and time the version 1 TxRequest document was created.
Example: 2021-01-01T00:00:00.000Z
userId string required
The Id of the User that produced this version of the TxRequest document. Could have created a new document or updated an existing document.
initiatedBy string required
The Id of the User that originally created the TxRequest document (initiated the TxRequest).
updatedBy string required
The Id of the User that last updated the TxRequest document. This is an alias for the userId field.
intents array required
pendingApprovalId string
The id of the Pending Approval that was created for the TxRequest if one was required.
policiesChecked boolean
latest boolean required
Indicates if this is the latest transaction request
isCanceled boolean
True, if the transaction request is canceled.

400 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id

401 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id

403 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id

404 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id