Fund Collateral Account
Transfer assets from your Go Account to your Collateral Account for margin trading. See the Guide.
-
Transfer assets from your Go Account to your Collateral Account. BitGo accepts USD, USDT, USDC, and BTC as collateral. After transferring assets, the assets lock and you can only withdraw them by contacting support@bitgo.com.
Prerequisites: You must have created wallets and deposited assets into your Go Account.
// 1. Deposit Assets
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export ACCOUNT_ID="<YOUR_ACCOUNT_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export CURRENCY="<ASSET_ID>"
export QUANTITY="<AMOUNT_IN_BASE_UNITS>"
curl -X POST \
http://$BITGO_EXPRESS_HOST/api/prime/trading/v1/accounts/$ACCOUNT_ID/margin/collateral/transfer \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"currency": "'"$CURRENCY"'",
"quantity": "'"$QUANTITY"'",
}'
// 1. Deposit Assets
// Use the REST API for this step (see cURL tab)
Response
// 1. Deposit Assets Response
{
"currency": "BTC",
"quantity": "2",
"balanceValue": {
"quantity": "1000000",
"currency": "USD"
}
}