GoMining API (2.0.0)

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:

1. User Management:

  • Create users within our system.
  • Allow users to log in.

2. Receiving Collection Data:

  • Obtain data on available collections for generation.
  • Use this data to create payment orders.

3. Synchronize Payments:

  • Synchronize with us using webhooks that you need to trigger upon successful payment.

4. Obtain Data on Users' Earnings:

  • Request data on the earnings of a specific user to display how much they have earned using our miners.

Authorization Levels:

The level of required authorization depends on the specific endpoint:

  • For some endpoints, just an API key, which you need to request from us, will suffice.
  • For others, you will need both an API key and a secret key, which also needs to be obtained directly from us.

Getting Started:

If you wish to use our API, please send a request to partners@gomining.com, and we will get in touch with you.

Endpoint security type

  • Each endpoint has a security type that determines how you will interact with it. This is stated next to the NAME of the endpoint. If no security type is stated, assume the security type is NONE.
  • API-keys are passed into the REST API via the X-PARTNER-API-KEY header.
  • API-keys and secret-keys are case sensitive.
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

  • API-KEY-WITH-SIGNATURE endpoints require an additional parameter, signature, to be sent in the query string or request body depends on HTTP method
  • The signature is not case sensitive.
  • A 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.
  • An additional parameter, 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.

API-KEY-WITH-SIGNATURE Endpoint Example for POST /api/partner/auth/init

apiSecret - 123a6fd0-f542-46dc-a91b-627146deb6c9

Example:

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"
}

API-KEY-WITH-SIGNATURE Endpoint Example for GET /api/partner/nft-income/find-by-user

apiSecret - 123a6fd0-f542-46dc-a91b-627146deb6c9

Example:

Example Parameters:

partnerUserId=123&timestamp=1721656927974&limit=20&offset=0

Example HMAC SHA256 signature:

echo -n 'partnerUserId=123&timestamp=1721656927974&limit=20&offset=0' | openssl dgst -sha256 -hmac "123a6fd0-f542-46dc-a91b-627146deb6c9"
SHA2-256(stdin)= 0cefa897946a49e8027b2c5787a48c547c83a6dc9f7d172870ba7f81cef42bd5

Example Query:

partnerUserId=123&timestamp=1721656927974&limit=20&offset=0&signature=0cefa897946a49e8027b2c5787a48c547c83a6dc9f7d172870ba7f81cef42bd5

auth

Auth generate-payload

Request Body schema: application/json
required
partnerId
required
string

Responses

Request samples

Content type
application/json
{
  • "partnerId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Auth check-proof

Request Body schema: application/json
required
required
object
required
object
required
"iphone" (string) or "ipad" (string) or "android" (string) or "windows" (string) or "mac" (string) or "linux" (string) or "browser" (string)
appName
required
string
appVersion
required
string
maxProtocolVersion
required
number
features
required
Array of any
required
object
address
required
string
required
"-239" (string) or "-3" (string)
walletStateInit
required
string
publicKey
required
string
required
"http" (string) or "injected" (string)
Any of
string ("http")
required
object
required
object

Responses

Request samples

Content type
application/json
{
  • "tonWallet": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Auth refresh c2s

Authorizations:
userAuth
Request Body schema: application/json
required
refreshToken
required
string

Responses

Request samples

Content type
application/json
{
  • "refreshToken": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Auth refresh s2s

Authorizations:
userAuth
Request Body schema: application/json
required
refreshToken
required
string

Responses

Request samples

Content type
application/json
{
  • "refreshToken": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

NFT

Use this endpoint to fetch user's miner data (API-KEY)

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.

Authorizations:
userAuth
query Parameters
limit
string [ 1 .. 3 ] characters ^\d{1,3}$
Examples: limit=20
offset
string [ 1 .. 5 ] characters ^\d{1,5}$
Examples: offset=0

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Use this endpoint to fetch user's miner data (API-KEY)

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.

Authorizations:
partnerAuth
query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

NFT Payment

Data on Available Miners for Generation (API-KEY)

By calling this endpoint, you will receive data on the specific collections of miners currently available. This includes their power in TH, energy efficiency in W/TH, the price for specific characteristics, and their ID within the GoMining ecosystem. These data will be necessary for you to form a payment order.

Authorizations:
userAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Data on Available Miners for Generation (API-KEY)

By calling this endpoint, you will receive data on the specific collections of miners currently available. This includes their power in TH, energy efficiency in W/TH, the price for specific characteristics, and their ID within the GoMining ecosystem. These data will be necessary for you to form a payment order.

Authorizations:
partnerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Initialize Payment for Miners (API-KEY-WITH-SIGNATURE)

Use the data received from the nft-collection/find-all-generative endpoint to form a payment for a specific miner.

Authorizations:
partnerAuth
Request Body schema: application/json
required
userId
required
integer >= 1

The ID of the user.

nftCollectionId
required
integer >= 1

The ID of the specific miner collection.

externalId
required
string [ 1 .. 255 ] characters

ID of the purchase on your side.

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.

Responses

Request samples

Content type
application/json
{
  • "userId": 1,
  • "nftCollectionId": 1,
  • "externalId": "string",
  • "signature": "string",
  • "timestamp": 1,
  • "recvWindow": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Use this endpoint to notify us about successful payments (API-KEY-WITH-SIGNATURE)

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.

Authorizations:
partnerAuth
Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "signature": "string",
  • "externalId": "string",
  • "timestamp": 1,
  • "recvWindow": 1,
  • "userId": 1
}

Response samples

Content type
application/json
{
  • "data": true
}

Income Statistic

/api/partner/c2s/income-statistic/get-income-per-th

Authorizations:
userAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

NFT Income

Request Miner Total Earnings Data Throughout The Entire Period for a Specific User (API-KEY-WITH-SIGNATURE)

By calling this endpoint and providing the required information, you will receive total data on the earnings of a specific user from all their miners throughout the entire period. You can use these data to inform users of their overall earnings from purchased miners throughout the entire period.

Authorizations:
userAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Request Miner Earnings Data for a Specific User (API-KEY-WITH-SIGNATURE)

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 these data to inform users of their overall earnings from purchased miners.

Authorizations:
userAuth
query Parameters
limit
string [ 1 .. 3 ] characters ^\d{1,3}$
Examples: limit=20
offset
string [ 1 .. 5 ] characters ^\d{1,5}$
Examples: offset=0

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Request Miner Earnings Data for a Specific User (API-KEY-WITH-SIGNATURE)

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 these data to inform users of their overall earnings from purchased miners.

Authorizations:
partnerAuth
query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Wallet

Use this endpoint to bind a Bitcoin wallet to a user account (API-KEY-WITH-SIGNATURE)

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.

Authorizations:
userAuth
Request Body schema: application/json
required
address
required
string [ 1 .. 255 ] characters

BTC wallet address.

Responses

Request samples

Content type
application/json
{
  • "address": "string"
}

Response samples

Content type
application/json
{
  • "data": true
}

Use this endpoint to fetch user's wallet data (API-KEY-WITH-SIGNATURE)

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.

Authorizations:
userAuth
query Parameters
limit
string [ 1 .. 3 ] characters ^\d{1,3}$
Examples: limit=20
offset
string [ 1 .. 5 ] characters ^\d{1,5}$
Examples: offset=0

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Use this endpoint to bind a Bitcoin wallet to a user account (API-KEY-WITH-SIGNATURE)

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.

Authorizations:
partnerAuth
Request Body schema: application/json
required
partnerUserId
required
string [ 1 .. 255 ] characters

The ID of the user within your system.

address
required
string [ 1 .. 255 ] characters

BTC wallet address.

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.

Responses

Request samples

Content type
application/json
{
  • "partnerUserId": "string",
  • "address": "string",
  • "signature": "string",
  • "timestamp": 1,
  • "recvWindow": 1
}

Response samples

Content type
application/json
{
  • "data": true
}

Use this endpoint to fetch user's wallet data (API-KEY-WITH-SIGNATURE)

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.

Authorizations:
partnerAuth
query Parameters
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.

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Authentication

Account Creation / Login (API-KEY-WITH-SIGNATURE)

By calling this endpoint, you will be able to register a new user or allow an existing user to log into their account.

Authorizations:
partnerAuth
Request Body schema: application/json
required
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.

Responses

Request samples

Content type
application/json
{
  • "partnerUserId": "string",
  • "signature": "string",
  • "timestamp": 1,
  • "recvWindow": 1
}

Response samples

Content type
application/json
{
  • "data": {
    }
}