Skip to main content

User

POST /v1/user/update

Update user display name.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/user/update?displayName=NewDisplayName"

Request

ParameterRequiredTypeDescription
displayNameYESstringDisplay name

Response Body

NameTypeDescription
userobjectUpdated user object
└ userIdlongUnique user ID
└ addressstringUser's wallet address
└ statusintegerUser status (1 = active)
└ userTypeintegerUser type
└ userClassintegerUser class
└ displayNamestringUser's display name
└ payoutAddressstringUser's payout address
└ collateralPerSlotstringCollateral per slot amount
└ onchainPayoutbooleanWhether on-chain payout is enabled
└ accountsobject[]List of user accounts
└└ accountIdlongUnique account ID
└└ userIdlongUser ID associated with the account
└└ typeintegerAccount type
└└ namestringAccount name
└└ statusintegerAccount status
└└ updateDatelongLast update timestamp in milliseconds

POST /v1/user/payoutAddress

Update user payout address.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/user/payoutAddress?payoutAddress=0x1234567890123456789012345678901234567890"

Request

ParameterRequiredTypeDescription
payoutAddressYESstringNew payout address (hex format)

Response Body

NameTypeDescription
successbooleanOperation success status

POST /v1/user/collateralPerSlot

Update user collateral per slot amount.

curl -H "Authorization: Bearer {{access_token}}" -X POST "$ETHGAS_API_URL/v1/user/collateralPerSlot?collateralPerSlot=10.5"

Request

ParameterRequiredTypeDescription
collateralPerSlotYESBigDecimalCollateral per slot amount (must be >= 0 and <= 100)

Response Body

NameTypeDescription
successbooleanOperation success status

Error Codes

collateralPerSlot must be within 0 to 100 (inclusive). Values &lt; 0 trigger COLLATERAL_PER_SLOT_NEGATIVE, and values &gt; 100 trigger COLLATERAL_PER_SLOT_TOO_LARGE.

CodeDescription
COLLATERAL_PER_SLOT_NEGATIVECollateral per slot cannot be negative
COLLATERAL_PER_SLOT_TOO_LARGECollateral per slot cannot exceed 100

GET /v1/user/info

Get user information.

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

Request

No parameters required.

Response Body

NameTypeDescription
userobjectUser object
└ userIdlongUnique user ID
└ addressstringUser's wallet address
└ statusintegerUser status (1 = active)
└ userTypeintegerUser type
└ userClassintegerUser class
└ displayNamestringUser's display name
└ payoutAddressstringUser's payout address
└ collateralPerSlotstringCollateral per slot amount
└ onchainPayoutbooleanWhether on-chain payout is enabled
└ accountsobject[]List of user accounts
└└ accountIdlongUnique account ID
└└ userIdlongUser ID associated with the account
└└ typeintegerAccount type
└└ namestringAccount name
└└ statusintegerAccount status
└└ updateDatelongLast update timestamp in milliseconds