Wallet

Initiate a trustline transaction

Initiate an unsigned trustline transaction to create a pending approval. Trustline transactions manage trusted tokens on the account. Available for Stellar. Use only with custodial wallets.

{ pendingApproval, error?, triggeredPolicy? }, not a bare PendingApproval — consequence: unsigned send throws that envelope; a bare PendingApproval codec would fail shadow validation and OpenAPI clients against the real body — consequence: omitting it from the codec drops a field the controller reads via validateSequenceId(req.body.sequenceId) trustline build: trustlines, memo, comment, sequenceId, fee, timebounds — consequence: omitting a consumed field 400s a previously accepted request — consequence: a raw number | string union accepts limit: "abc", which becomes BigNumber NaN; range checks never fire and formatBaseUnits throws an untyped 500 the XLM builder's isNaN(fee/timebounds) checks do not reject Infinity — consequence: documenting type on the body would let callers think they can override the transaction type

post/api/v2/{coin}/wallet/{walletId}/trustline/initiate

Path parameters

coinstring required

A cryptocurrency symbol or token ticker symbol

Example:btc

A cryptocurrency or token ticker symbol

walletIdstring required
Example:59cd72485007a239fb00282ed480da1f

The wallet ID

Request body

commentstring

Optional metadata (only persisted in BitGo) to be applied to the transaction. Use this to add transaction-specific information such as the transaction's purpose or another identifier that you want to reference later. The value is shown in the UI in the transfer listing page.

sequenceIdstring

Sequence ID for the trustline transaction. Forwarded to unsigned send, not the Stellar account sequence.

feenumber

Custom Stellar transaction fee. Consumed by XLM getTrustlineBuildParams / buildTransaction as Number(fee). IMS fee is used when omitted.

Example request

{
  "trustlines": [
    {
      "token": "txlm:BST-GBQTIOS3XGHB7LVYGBKQVJGCZ3R4JL5E4CBSWJ5ALIJUHBKS6263644L"
    }
  ]
}

Response

Accepted

errorstring
triggeredPolicystring

Changes