Funding
GET /v1/p/funding/contractAddress
Get deposit collateral address.
- HTTP
- Python
curl -X GET "$ETHGAS_API_URL/v1/p/funding/contractAddress"
import requests
url = f"{ETHGAS_API_URL}/v1/p/funding/contractAddress"
response = requests.get(url)
print(response.text)
Request
No parameters required.
Response Body
| Name | Type | Description |
|---|---|---|
| contractAddress | string | Deposit collateral address |
Example Response
{
"success": true,
"data": {
"contractAddress": "0x3314Fb492a5d205A601f2A0521fAFbD039502Fc3"
}
}
GET /v1/user/funding/deposits
Get fund deposits history.
- HTTP
- Python
curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/funding/deposits"
import requests
url = f"{ETHGAS_API_URL}/v1/user/funding/deposits"
headers = {'Authorization': 'Bearer <your-auth-token>'}
response = requests.get(url, headers=headers)
print(response.text)
Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| limit | NO | integer | Maximum number of deposits to return |
| startBlockId | NO | integer | Block start ID |
Response Body
| Name | Type | Description |
|---|---|---|
| deposits | object[] | List of deposits |
| └ eventId | long | Unique deposit event ID |
| └ chainId | integer | Chain ID |
| └ blockIdx | long | Block ID |
| └ blockHash | byte[] | Block hash |
| └ transactionHash | byte[] | Transaction hash |
| └ senderAddress | string | Sender address |
| └ depositAddress | string | Deposit address |
| └ status | integer | Deposit status (success = 10) |
| └ createDate | date | Create date |
POST /v1/user/funding/withdraw
Request to withdraw funds.
- HTTP
- Python
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"}]'
import requests
import json
url = f"{ETHGAS_API_URL}/v1/user/funding/withdraw"
payload = [{
"accountId": 12,
"tokenId": 1,
"chainId": 1,
"quantity": "0.05"
}]
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your-auth-token>'
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
Request
Request body: array of withdraw request objects.
| Parameter | Required | Type | Description |
|---|---|---|---|
| accountId | YES | integer | Account ID |
| chainId | YES | integer | Chain ID |
| tokenId | YES | integer | Token ID |
| quantity | YES | string | Quantity to be withdrawn |
Response Body
| Name | Type | Description |
|---|---|---|
| submittedRequestIds | integer[] | List of successful submitted request IDs |
| failedRequests | object[] | List of failed requests with reason |
GET /v1/p/funding/withdraw/dailyWithdrawLimits
Get list of token's current on-chain daily withdraw limits.
- HTTP
- Python
curl -X GET "$ETHGAS_API_URL/v1/p/funding/withdraw/dailyWithdrawLimits"
import requests
url = f"{ETHGAS_API_URL}/v1/p/funding/withdraw/dailyWithdrawLimits"
response = requests.get(url)
print(response.text)
Request
No parameters required.
Response Body
| Name | Type | Description |
|---|---|---|
| dailyWithdrawLimits | object[] | List of withdraw limit objects |
| └ tokenId | integer | Token ID |
| └ chainId | integer | Chain ID |
| └ tokenAddress | string | ERC-20 token contract address |
| └ withdrawFee | string | Withdrawal fee |
| └ dailyWithdrawLimit | string | Daily withdraw limit |
| └ remainingWithdrawLimit | string | Remaining limit in past 24 hours |
GET /v1/user/funding/withdraw/status
Get fund withdrawal request status for given list of request IDs.
- HTTP
- Python
curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/funding/withdraw/status?requestIds=123,456"
import requests
url = f"{ETHGAS_API_URL}/v1/user/funding/withdraw/status"
params = {'requestIds': '123,456'}
headers = {'Authorization': 'Bearer <your-auth-token>'}
response = requests.get(url, headers=headers, params=params)
print(response.text)
Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| requestIds | YES | integer[] | List of fund withdrawal request IDs |
Response Body
| Name | Type | Description |
|---|---|---|
| requests | object[] | List of withdraw requests |
| └ requestId | integer | Request ID |
| └ status | integer | Status of withdraw request |
| └ txHash | string | Transaction hash |
| └ quantity | string | Quantity withdrawn |
GET /v1/user/funding/withdraws
Get list of fund withdrawals.
- HTTP
- Python
curl -H "Authorization: Bearer {{access_token}}" -X GET "$ETHGAS_API_URL/v1/user/funding/withdraws"
import requests
url = f"{ETHGAS_API_URL}/v1/user/funding/withdraws"
headers = {'Authorization': 'Bearer <your-auth-token>'}
response = requests.get(url, headers=headers)
print(response.text)
Request
| Parameter | Required | Type | Description |
|---|---|---|---|
| limit | NO | integer | Maximum number of withdrawals to return |
| startId | NO | integer | Fund withdrawal request start ID |
Response Body
| Name | Type | Description |
|---|---|---|
| requests | object[] | List of withdraw requests |
| └ requestId | integer | Request ID |
| └ status | integer | Status of withdraw request |
| └ txHash | string | Transaction hash |