Coin Transfers

/v2/app/coin/transfer

This API transfers (i.e., moves) a cryptocurrency (coin) from one wallet to any other wallet. This assumes that the from wallet holds the requisite balance of the specified cryptocurrency, or else, the transaction will fail on the chain.

šŸ“˜

Only currencies created using MetaKeep API are supported currently.

Invoking without from user

If you don't provide a from user in the request body, coins will be transferred from your developer account and a transaction will be raised and submitted to the Queue on the blockchain. MetaKeep, behind the scenes, employs several strategies to make sure transactions succeed, and at the lowest cost.

You can get the status of this blockchain transaction by querying for transaction status by copying the transactionId from this API response and querying it in Transaction Status API.

ā—ļø

Replaying this API

Once you get a status response as QUEUED, replaying this API doesn't give you the latest status; Replaying the same API with the same Idempotency-Key results in the same response, always with status-QUEUED. You must query the Transaction Status API for the latest status.

As you would learn from the Transaction Status API docs, if a transaction failed, MetaKeep would have exhausted all feasible smart AI-based strategies to recover from failure, that would have been attempted by humans and the "FAILED" status, if shown, is final.

Invoking with a from user

If you provide a from user in the request body, you will get a consentToken back and you will have to use Get Consent flow to finish the transfer. Here, the developer is agreeing to pick up the gas fee on execution so that the user doesn't have to know/understand the concept of gas. MetaKeep, behind the scenes, employs several strategies to make sure transactions succeed, and at the lowest cost.

{
  "status": "USER_CONSENT_NEEDED",
  "consentToken": "CrgBAQIDAHgtrXLM7Takfd-ccn6FAthYppUrIuoEMsncIpxm4af4uUh4Cikr2YkEzasNQr9433Z-V73Hw=="
}

Note that symbol(e.g. USDC) transfer is not supported on all chains. Please check the Chain Compatibility for the latest information.

šŸš§

Api Error Status

You can find error status returned by the api here.

Ā© Copyright 2024, Passbird Research Inc.

Language
Authorization
Header
Click Try It! to start a request and see the response here!