Skip to main content

Funding

GET /v1/p/funding/contractAddress

Get deposit collateral address.

curl -X GET "$ETHGAS_API_URL/v1/p/funding/contractAddress"

Request

No parameters required.

Response Body

NameTypeDescription
contractAddressstringDeposit collateral address

Example Response

{
"success": true,
"data": {
"contractAddress": "0x3314Fb492a5d205A601f2A0521fAFbD039502Fc3"
}
}

GET /v1/user/funding/deposits

Get fund deposits history.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/funding/deposits"

Request

ParameterRequiredTypeDescription
limitNOintegerMaximum number of deposits to return
startBlockIdNOintegerBlock start ID

Response Body

NameTypeDescription
depositsobject[]List of deposits
└ eventIdlongUnique deposit event ID
└ chainIdintegerChain ID
└ blockIdxlongBlock ID
└ blockHashbyte[]Block hash
└ transactionHashbyte[]Transaction hash
└ senderAddressstringSender address
└ depositAddressstringDeposit address
└ statusintegerDeposit status (success = 10)
└ createDatedateCreate date

POST /v1/user/funding/withdraw

Request to withdraw funds.

curl -X POST "$ETHGAS_API_URL/v1/user/funding/withdraw" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {{access_token}}" \
-d '[{"accountId": 12, "tokenId": 1, "chainId": 1, "quantity": "0.05"}]'

Request

Request body: array of withdraw request objects.

ParameterRequiredTypeDescription
accountIdYESintegerAccount ID
chainIdYESintegerChain ID
tokenIdYESintegerToken ID
quantityYESstringQuantity to be withdrawn

Response Body

NameTypeDescription
submittedRequestIdsinteger[]List of successful submitted request IDs
failedRequestsobject[]List of failed requests with reason

GET /v1/p/funding/withdraw/dailyWithdrawLimits

Get list of token's current on-chain daily withdraw limits.

curl -X GET "$ETHGAS_API_URL/v1/p/funding/withdraw/dailyWithdrawLimits"

Request

No parameters required.

Response Body

NameTypeDescription
dailyWithdrawLimitsobject[]List of withdraw limit objects
└ tokenIdintegerToken ID
└ chainIdintegerChain ID
└ tokenAddressstringERC-20 token contract address
└ withdrawFeestringWithdrawal fee
└ dailyWithdrawLimitstringDaily withdraw limit
└ remainingWithdrawLimitstringRemaining limit in past 24 hours

GET /v1/user/funding/withdraw/status

Get fund withdrawal request status for given list of request IDs.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/funding/withdraw/status?requestIds=123,456"

Request

ParameterRequiredTypeDescription
requestIdsYESinteger[]List of fund withdrawal request IDs

Response Body

NameTypeDescription
requestsobject[]List of withdraw requests
└ requestIdintegerRequest ID
└ statusintegerStatus of withdraw request
└ txHashstringTransaction hash
└ quantitystringQuantity withdrawn

GET /v1/user/funding/withdraws

Get list of fund withdrawals.

curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/funding/withdraws"

Request

ParameterRequiredTypeDescription
limitNOintegerMaximum number of withdrawals to return
startIdNOintegerFund withdrawal request start ID

Response Body

NameTypeDescription
requestsobject[]List of withdraw requests
└ requestIdintegerRequest ID
└ statusintegerStatus of withdraw request
└ txHashstringTransaction hash