Download OpenAPI specification:Download
A short summary of the API.
This API enables all authorized partners to interact with GoMining. With its help, you can:
The level of required authorization depends on the specific endpoint:
If you wish to use our API, please send a request to partners@gomining.com, and we will get in touch with you.
X-PARTNER-API-KEY header.| Security Type | Description |
|---|---|
| API-KEY | Endpoint requires sending a valid API-Key. |
| API-KEY-WITH-SIGNATURE | Endpoint requires sending a valid API-Key and signature. |
API-KEY-WITH-SIGNATURE endpoints require an additional parameter, signature, to be sent in the query string or request body depends on HTTP methodsignature is not case sensitive.API-KEY-WITH-SIGNATURE endpoint also requires a parameter, timestamp, to be sent which should be the millisecond timestamp of when the request was created and sent.recvWindow, may be sent to specify the number of milliseconds after timestamp the request is valid for. If recvWindow is not sent, it defaults to 5000.apiSecret - 123a6fd0-f542-46dc-a91b-627146deb6c9
Example Parameters:
{
"partnerUserId": "123",
"timestamp": 1721656927974,
}
Example HMAC SHA256 signature:
echo -n '{"partnerUserId":"123","timestamp":1721656927974}' | openssl dgst -sha256 -hmac "123a6fd0-f542-46dc-a91b-627146deb6c9"
SHA2-256(stdin)= 03955aeac5ffe46c02fbb74e2b41f0d36f3992b5363253949a4a7dd79c972a24
Example Body:
{
"partnerUserId": "123",
"timestamp": 1721656927974,
"signature": "03955aeac5ffe46c02fbb74e2b41f0d36f3992b5363253949a4a7dd79c972a24"
}
apiSecret - 123a6fd0-f542-46dc-a91b-627146deb6c9
Example Parameters:
partnerUserId=123×tamp=1721656927974&limit=20&offset=0
Example HMAC SHA256 signature:
echo -n 'partnerUserId=123×tamp=1721656927974&limit=20&offset=0' | openssl dgst -sha256 -hmac "123a6fd0-f542-46dc-a91b-627146deb6c9"
SHA2-256(stdin)= 0cefa897946a49e8027b2c5787a48c547c83a6dc9f7d172870ba7f81cef42bd5
Example Query:
partnerUserId=123×tamp=1721656927974&limit=20&offset=0&signature=0cefa897946a49e8027b2c5787a48c547c83a6dc9f7d172870ba7f81cef42bd5
| partnerId required | string Unique partner identifier provided by GoMining for authentication |
{- "partnerId": "partner-123e4567-e89b-12d3-a456-426614174000"
}{- "data": {
- "payload": "auth_payload_abc123def456"
}
}required | object | ||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
{- "tonWallet": {
- "device": {
- "platform": "iphone",
- "appName": "string",
- "appVersion": "string",
- "maxProtocolVersion": 0,
- "features": [
- null
]
}, - "account": {
- "address": "string",
- "chain": "-239",
- "walletStateInit": "string",
- "publicKey": "string"
}, - "provider": "http",
- "connectItems": {
- "tonProof": {
- "name": "ton_proof",
- "proof": {
- "domain": {
- "lengthBytes": 0,
- "value": "string"
}, - "payload": "string",
- "signature": "string",
- "timestamp": 0
}
}
}
}
}{- "data": {
- "jwtToken": "string",
- "refreshToken": "string"
}
}By calling this endpoint, you can refresh your authentication token using a valid refresh token. After calling it you will receive new JWT and refresh tokens.
| refreshToken required | string |
{- "refreshToken": "string"
}{- "data": {
- "jwtToken": "string",
- "refreshToken": "string"
}
}By calling this endpoint, you will be able to register a new user or allow an existing user to log into their account.
| partnerUserId required | string [ 1 .. 255 ] characters The unique user identifier from your partner system for account creation or login |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 signature for request authentication using your API secret |
| timestamp required | integer >= 1 Unix timestamp in milliseconds when the request was created |
| recvWindow | integer >= 1 Request validity window in milliseconds after timestamp (default: 60000ms) |
string non-empty Optional email address for user account (used for notifications and recovery) |
{- "partnerUserId": "user123",
- "signature": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
- "timestamp": 1703001600000,
- "recvWindow": 5000,
- "email": "[email protected]"
}{- "data": {
- "jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refreshToken": "rt_abc123def456ghi789"
}
}By calling this endpoint, you can refresh your authentication token using a valid refresh token. After calling it you will receive new JWT and refresh tokens.
| refreshToken required | string |
{- "refreshToken": "rt_abc123def456ghi789"
}{- "data": {
- "jwtToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refreshToken": "rt_abc123def456ghi789"
}
}By calling this endpoint, you can retrieve a list of miners that are associated with the user, along with their characteristics. This helps you to show users the details of all their miners along with their specifications.
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 Maximum number of miners to return in response (1-999) |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 Number of miners to skip for pagination (0-99999) |
{- "data": {
- "array": [
- {
- "id": 1001,
- "createdAt": "2023-01-15T10:30:00Z",
- "name": "Miner Pro X1",
- "power": 100.5,
- "energyEfficiency": 25.8,
}
]
}
}By calling this endpoint, you can retrieve a list of miners that are associated with the user, along with their characteristics. This helps you to show users the details of all their miners along with their specifications.
| partnerUserId required | string [ 1 .. 255 ] characters Examples: partnerUserId=user123 partnerUserId=abc456 The ID of the user within your system. |
| signature required | string [ 1 .. 64 ] characters Examples: signature=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6 HMAC SHA256 Signature. |
| timestamp required | string^\d+$ Examples: timestamp=1703001600000 timestamp=1703088000000 The timestamp of when the request was created and sent. |
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 |
| recvWindow | string^\d+$ Examples: recvWindow=5000 recvWindow=10000 Number of milliseconds after timestamp the request is valid for. |
{- "data": {
- "array": [
- {
- "id": 1001,
- "createdAt": "2023-01-15T10:30:00Z",
- "name": "Miner Pro X1",
- "power": 100.5,
- "energyEfficiency": 25.8,
}
]
}
}By calling this endpoint, you can transfer an NFT from one user to another. After calling it the NFT ownership will be moved from the source user to the destination user, and you will receive a confirmation of the successful transfer.
| partnerUserId required | string [ 1 .. 255 ] characters The unique user identifier from your partner system who currently owns the NFT |
| nftId required | number >= 1 The unique identifier of the NFT to be transferred |
| toPartnerUserId required | string non-empty The unique user identifier from your partner system who will receive the NFT |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 signature for request authentication using your API secret |
| timestamp required | integer >= 1 Unix timestamp in milliseconds when the request was created |
| recvWindow | integer >= 1 Request validity window in milliseconds after timestamp (default: 60000ms) |
{- "partnerUserId": "user123",
- "nftId": 123,
- "toPartnerUserId": "recipient789",
- "signature": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
- "timestamp": 1703001600000,
- "recvWindow": 5000
}{- "data": true
}By calling this endpoint, you will receive data on the specific collections of miners currently available. The response includes their power (TH), energy efficiency (W/TH), pricing for each configuration, and unique IDs within the GoMining ecosystem. This information is required to create a payment order.
{- "data": {
- "array": [
- {
- "id": 0,
- "power": 0,
- "energyEfficiency": 0,
- "value": 0,
- "annualROI": 0,
- "poolReward": 0,
- "electricityCost": 0,
- "serviceCost": 0,
- "levelDiscount": 0
}
]
}
}By calling this endpoint, you will receive information about the miner collections currently available. The response includes their power (TH), energy efficiency (W/TH), pricing by characteristics, and unique IDs within the GoMining ecosystem. This data is required to generate a payment order.
{- "data": {
- "array": [
- {
- "id": 1,
- "power": 1,
- "energyEfficiency": 20,
- "value": 20.99,
- "annualROI": 24.6,
- "poolReward": 6.6e-7,
- "electricityCost": 0.024,
- "serviceCost": 0.0089,
- "levelDiscount": 0
}
]
}
}Use the data received from the nft-collection/find-all-generative endpoint to form a payment for a specific miner.
| userId required | integer >= 1 The internal GoMining user ID who will receive the miner NFT |
| nftCollectionId required | integer >= 1 The ID of the miner collection to purchase (from find-all-generative endpoint) |
| externalId required | string [ 1 .. 255 ] characters Unique transaction identifier from your payment system for tracking |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 signature for request authentication using your API secret |
| timestamp required | integer >= 1 Unix timestamp in milliseconds when the request was created |
| recvWindow | integer >= 1 Request validity window in milliseconds (default: 60000ms) |
{- "userId": 123,
- "nftCollectionId": 1,
- "externalId": "order_12345",
- "signature": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
- "timestamp": 1703001600000,
- "recvWindow": 5000
}{- "data": {
- "value": 20.99,
- "externalId": "order_12345"
}
}By calling this endpoint, you can notify us that the payment has been successfully completed. This ensures that our system is updated with the actual payment status.
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 Signature. |
| externalId required | string [ 1 .. 255 ] characters ID of the purchase on your side. |
| timestamp required | integer >= 1 The timestamp of when the request was created and sent. |
| recvWindow | integer >= 1 Number of milliseconds after timestamp the request is valid for. |
| userId required | integer >= 1 User ID. |
{- "signature": "string",
- "externalId": "string",
- "timestamp": 1,
- "recvWindow": 1,
- "userId": 1
}{- "data": true
}Retrieve real-time income statistics per terahash (TH/s) for mining operations. Returns current BTC rate, Gomining token rate, electricity cost per kWh, service costs, and calculated net income per TH/s.
{- "data": {
- "incomePerTh": 0,
- "btcRate": 0,
- "gominingRate": 0,
- "kWh": 0,
- "serviceCost": 0
}
}Retrieve real-time income statistics per terahash (TH/s) for mining operations. Returns current BTC rate, Gomining token rate, electricity cost per kWh, service costs, and calculated net income per TH/s.
| timestamp required | integer >= 1 Unix timestamp in milliseconds when the request was created |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 signature for request authentication using your API secret |
| recvWindow | integer >= 1 Request validity window in milliseconds after timestamp (default: 60000ms) |
{- "timestamp": 1703001600000,
- "signature": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
- "recvWindow": 5000
}{- "data": {
- "incomePerTh": 0,
- "btcRate": 0,
- "gominingRate": 0,
- "kWh": 0,
- "serviceCost": 0
}
}By calling this endpoint and providing the required parameters, you will receive aggregated data on a user’s earnings from all their miners over the entire period. This information can be used to inform users about their total earnings from purchased miners.
{- "data": {
- "array": [
- {
- "totalValue": 0,
- "nftId": 0
}
], - "totalIncome": 0,
- "lastIncome": { },
- "withdrawnAmount": 0,
- "onBalanceAmount": 0
}
}By calling this endpoint, you will receive earnings data for the authenticated user. Use groupByDays=true to get daily aggregated data with nested individual records, or leave it false for a simple list of individual income records.
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 limit=50 limit=100 Maximum number of income records to return (default: 20, max: 100) |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 offset=20 offset=100 Number of records to skip for pagination (default: 0) |
| groupByDays | boolean Examples: groupByDays=true groupByDays=false Group income records by days (default: false) |
{- "data": {
- "array": [
- {
- "createdAt": "2023-12-01T10:30:00Z",
- "value": 0.00012345,
- "c1Value": 0.00001234,
- "c2Value": 0.00002345,
- "c3Value": 0.00003456,
- "c4Value": 0.00004567,
- "nftId": 123
}
]
}
}By calling this endpoint and providing the required information, you will receive data on the earnings of a specific user from all their miners. You can use this data to inform users of their overall earnings from purchased miners.
| partnerUserId required | string [ 1 .. 255 ] characters The ID of the user within your system. |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 Signature. |
| timestamp required | string^\d+$ The timestamp of when the request was created and sent. |
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 |
| recvWindow | string^\d+$ Number of milliseconds after timestamp the request is valid for. |
{- "data": {
- "array": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "value": 0,
- "c1Value": 0,
- "c2Value": 0,
- "c3Value": 0,
- "c4Value": 0,
- "nftId": 0
}
]
}
}By calling this endpoint and providing the required information, you will receive a list of aggregated mining rewards for a specific user over a selected date range. Each item in the list represents a single day and includes earnings per miner.
| partnerUserId required | string [ 1 .. 255 ] characters The ID of the user within your system. |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 Signature. |
| timestamp required | string^\d+$ The timestamp of when the request was created and sent. |
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 |
| recvWindow | string^\d+$ Number of milliseconds after timestamp the request is valid for. |
| includeIncomesByNfts | string^(true|false)$ Default: "false" Examples: includeIncomesByNfts=true Flag to determine if "incomes" property, which contains income-related data for each NFT, should contain the actual data in the response or should be null. By default it is null. |
| startDate required | string <date-time> |
| endDate required | string <date-time> |
{- "data": [
- {
- "createdAt": "2023-01-15T10:30:00Z",
- "reward": 0.00001,
- "poolReward": 0.00001,
- "totalPower": 1000,
- "avgEnergyEfficiency": 20,
- "serviceFee": 0.144,
- "totalDiscount": 0.15,
- "toAddress": { },
- "status": "calculated",
- "incomes": { }
}
], - "totalCount": 10
}By calling this endpoint, you can bind a Bitcoin wallet to a specific user. This allows us to know which wallet is associated with the user and enables us to proceed with the withdrawals of user's income, thus fulfilling the full cycle of the investment.
| address required | string [ 1 .. 255 ] characters Valid Bitcoin wallet address to bind to the user account for income withdrawals |
{- "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}{- "data": true
}By calling this endpoint, you can retrieve a list of wallets that the user has linked to their account. After calling it you'd receive an array with data on each wallet separately.
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 |
{- "data": {
- "array": [
- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "address": "string",
- "type": "ETH"
}
]
}
}By calling this endpoint, you can retrieve the current balances for all user wallets across all supported currencies. After calling it you will receive an array with balance information for each currency that the user has in their account.
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 |
{- "data": {
- "array": [
- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "currency": "string",
- "balance": 0
}
]
}
}By calling this endpoint, you can bind a Bitcoin wallet to a specific user. This allows us to know which wallet is associated with the user and enables us to proceed with the withdrawals of user' income, thus fulfilling the full cycle of the investment.
| partnerUserId required | string [ 1 .. 255 ] characters The unique user identifier from your partner system to bind the wallet to |
| address required | string [ 1 .. 255 ] characters Valid Bitcoin wallet address to bind to the specified user account |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 signature for request authentication using your API secret |
| timestamp required | integer >= 1 Unix timestamp in milliseconds when the request was created |
| recvWindow | integer >= 1 Request validity window in milliseconds after timestamp (default: 60000ms) |
{- "partnerUserId": "user123",
- "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
- "signature": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6",
- "timestamp": 1703001600000,
- "recvWindow": 5000
}{- "data": true
}By calling this endpoint, you can retrieve a list of wallets that user has linked to their account. After calling it you'd receive an array with data on each wallet separately.
| partnerUserId required | string [ 1 .. 255 ] characters The ID of the user within your system. |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 Signature. |
| timestamp required | string^\d+$ The timestamp of when the request was created and sent. |
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 |
| recvWindow | string^\d+$ Number of milliseconds after timestamp the request is valid for. |
{- "data": {
- "array": [
- {
- "id": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "address": "string",
- "type": "ETH"
}
]
}
}By calling this endpoint, you can retrieve wallet balances by wallet IDs. After calling it you'd receive an array with data on each wallet separately.
| partnerUserId required | string [ 1 .. 255 ] characters Examples: partnerUserId=user123 partnerUserId=abc456 The unique user identifier from your partner system |
| signature required | string [ 1 .. 64 ] characters Examples: signature=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6 HMAC SHA256 signature for request authentication using your API secret |
| timestamp required | string^\d+$ Examples: timestamp=1703001600000 timestamp=1703088000000 Unix timestamp in milliseconds when the request was created |
| limit | string [ 1 .. 3 ] characters ^\d{1,3}$ Examples: limit=20 Maximum number of wallet balances to return (1-999) |
| offset | string [ 1 .. 5 ] characters ^\d{1,5}$ Examples: offset=0 Number of wallet balances to skip for pagination (0-99999) |
| recvWindow | string^\d+$ Examples: recvWindow=5000 recvWindow=10000 Request validity window in milliseconds after timestamp (default: 60000ms) |
{- "data": {
- "array": [
- {
- "id": 1,
- "gmtValueAtSyncDateNumeric": { },
- "timeLockedValueAtSyncDateNumeric": { },
- "flexibleStakingValueAtSyncDateNumeric": { },
- "freezedValueNumericAtSyncDate": { },
- "valueNumericAtSyncDate": "2000.85"
}
]
}
}By calling this endpoint, you can create 24h income withdrawal order.
| walletAddress required | string |
| amount required | number >= 0 |
| partnerUserId required | string [ 1 .. 255 ] characters The ID of the user within your system. |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 Signature. |
| timestamp required | integer >= 1 The timestamp of when the request was created and sent. |
| recvWindow | integer >= 1 Number of milliseconds after timestamp the request is valid for. |
{- "walletAddress": "string",
- "amount": 0,
- "partnerUserId": "string",
- "signature": "string",
- "timestamp": 1,
- "recvWindow": 1
}{- "data": true
}By calling this endpoint, you can create fast income withdrawal order.
| partnerUserId required | string [ 1 .. 255 ] characters The ID of the user within your system. |
| walletAddress required | string |
| amount required | number >= 0 |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 Signature. |
| timestamp required | integer >= 1 The timestamp of when the request was created and sent. |
| recvWindow | integer >= 1 Number of milliseconds after timestamp the request is valid for. |
{- "partnerUserId": "string",
- "walletAddress": "string",
- "amount": 0,
- "signature": "string",
- "timestamp": 1,
- "recvWindow": 1
}{- "data": true
}By calling this endpoint, you can retrieve commission information for fast withdrawals (income-withdraw). After calling it you'll receive an object with data on the minimum withdrawal amount and commission rate.
| partnerUserId required | string [ 1 .. 255 ] characters The ID of the user within your system. |
| signature required | string [ 1 .. 64 ] characters HMAC SHA256 Signature. |
| timestamp required | string^\d+$ The timestamp of when the request was created and sent. |
| recvWindow | string^\d+$ Number of milliseconds after timestamp the request is valid for. |
{- "data": {
- "incomeWithdrawMinValue": 0,
- "incomeWithdrawCommission": 0
}
}By calling this endpoint, you can retrieve current exchange rates for (GOMINING ↔ USD). After calling it you will receive an array with current price data for each symbol.
{- "data": {
- "array": [
- {
- "symbol": "string",
- "price": 0
}
]
}
}By calling this endpoint and providing the required information, you will receive general statistics for a specific user including basic info, wallet count, NFT count.
| partnerUserId required | string [ 1 .. 255 ] characters Examples: partnerUserId=user123 partnerUserId=abc456 The unique user identifier from your partner system to retrieve statistics for |
| signature required | string [ 1 .. 64 ] characters Examples: signature=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6 HMAC SHA256 signature for request authentication using your API secret |
| timestamp required | string^\d+$ Examples: timestamp=1703001600000 timestamp=1703088000000 Unix timestamp in milliseconds when the request was created |
| recvWindow | string^\d+$ Examples: recvWindow=5000 recvWindow=10000 Request validity window in milliseconds after timestamp (default: 60000ms) |
{- "data": {
- "user": {
- "id": 123,
- "partnerUserId": "user123",
- "createdAt": "2023-01-15T10:30:00Z",
- "email": "[email protected]"
}, - "stats": {
- "walletsCount": 3,
- "nftsCount": 10,
- "totalPowerTH": 1500.5,
- "avgEnergyEfficiency": 25.8,
- "totalIncome": 0.00001593,
- "discount": 0.2
}
}
}Partners can request NFT upgrades via this S2S endpoint. The system internally processes the request by creating a post-payment in the partner's name, then applies the upgrade to improve the miner's characteristics. Supports upgrading either Energy Efficiency (EE) or Power attributes by specifying the NFT ID and the current and target values. Returns a unique request ID for tracking the upgrade process.
required | object or object | ||||||||
Any of
| |||||||||
{- "data": {
- "type": "nftEnergyEfficiencyUpgrade",
- "nftId": 0,
- "fromEnergyEfficiency": 0,
- "toEnergyEfficiency": 0
}
}{- "data": {
- "id": "string"
}
}Partners can calculate NFT upgrade price via this S2S endpoint. The actual post-payment price may differ from the price returned by this endpoint.
required | "nftEnergyEfficiencyUpgrade" (string) or "nftPowerUpgrade" (string) |
| nftId required | string |
| from required | string |
| to required | string |
{- "data": {
- "price": 0
}
}