All URIs are relative to https://api.blockchainapi.com/v1
Method | HTTP request | Description |
---|---|---|
SolanaGetAllNFTsFromCandyMachine | GET /solana/nft/candy_machine/{network}/{candy_machine_id}/nfts | Get CM's NFTs |
SolanaGetCandyMachineMetadata | POST /solana/nft/candy_machine/metadata | Get a CM's metadata |
SolanaListAllCandyMachines | GET /solana/nft/candy_machine/list | List all CMs |
SolanaSearchCandyMachines | POST /solana/nft/candy_machine/search | Search CMs |
GetAllNFTsResponse SolanaGetAllNFTsFromCandyMachine (string network, string candyMachineId)
Get CM's NFTs
<a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-candy-machine/get-candy-machine-all-nfts\" target="_blank"> See examples (Python, JavaScript). Use this endpoint to get the list of all NFTs (minted and unminted) from a Solana Candy Machine. This works for v1
and v2
candy machines. However, for v2
only the value for all_nfts
is provided. To determine which are minted and unminted follow this example. You do not need to specify v1
or v2
for this endpoint as it will automatically determine it from the candy machine ID. See example for how to get the list of NFT hashes <a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-candy-machine/get-candy-machine-hash-table\" target="_blank">here. Cost: 2 Credits
(<a href="#section/Pricing">See Pricing)
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class SolanaGetAllNFTsFromCandyMachineExample
{
public static void Main()
{
Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
// Configure API key authorization: APIKeyID
Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
// Configure API key authorization: APISecretKey
Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");
var apiInstance = new SolanaCandyMachineApi(Configuration.Default);
var network = mainnet-beta; // string | The network ID
var candyMachineId = FmkrvXRenCGtwBHw3VtBcExp8eTdnau97upaewF4GUEX; // string | The ID of the candy machine
try
{
// Get CM's NFTs
GetAllNFTsResponse result = apiInstance.SolanaGetAllNFTsFromCandyMachine(network, candyMachineId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SolanaCandyMachineApi.SolanaGetAllNFTsFromCandyMachine: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
network | string | The network ID | |
candyMachineId | string | The ID of the candy machine |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response. Click "Expand All" on the right sidebar to see more. | - |
400 | Bad request (check response message) | - |
401 | Invalid API key pair in headers | - |
402 | Payment required. Occurs when you run out of API requests. Upgrade <a href="https://dashboard.theblockchainapi.com/billing\" target="_blank">here</a>. | - |
404 | Not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetCandyMetadataResponse SolanaGetCandyMachineMetadata (GetCandyMetadataRequest getCandyMetadataRequest = null)
Get a CM's metadata
<a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-candy-machine/get-candy-machine-metadata\" target="_blank">See examples (Python, JavaScript). Use this endpoint to get metadata about a Metaplex candy machine. This includes the goLiveDate, itemsAvailable, and itemsRedeemed. To see what is included, expand the green successful response below. NOTE: Supply exactly one of candy_machine_id
, config_address
, or uuid
. If you provide more than one, you will receive a 400
error. Cost: 2 Credits
(<a href="#section/Pricing">See Pricing)
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class SolanaGetCandyMachineMetadataExample
{
public static void Main()
{
Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
// Configure API key authorization: APIKeyID
Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
// Configure API key authorization: APISecretKey
Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");
var apiInstance = new SolanaCandyMachineApi(Configuration.Default);
var getCandyMetadataRequest = new GetCandyMetadataRequest(); // GetCandyMetadataRequest | (optional)
try
{
// Get a CM's metadata
GetCandyMetadataResponse result = apiInstance.SolanaGetCandyMachineMetadata(getCandyMetadataRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SolanaCandyMachineApi.SolanaGetCandyMachineMetadata: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
getCandyMetadataRequest | GetCandyMetadataRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response. | - |
400 | Bad request (check response message) | - |
401 | Invalid API key pair in headers | - |
402 | Payment required. Occurs when you run out of API requests. Upgrade <a href="https://dashboard.theblockchainapi.com/billing\" target="_blank">here</a>. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Object SolanaListAllCandyMachines ()
List all CMs
<a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-candy-machine/list-all-candy-machines\" target="_blank">See examples (Python, JavaScript). With this endpoint, you can list all candy machines published to Solana mainnet. We update this data every 15 minutes. The output is a list of config addresses, currently about 17000 in length. Cost: 2 Credits
(<a href="#section/Pricing">See Pricing)
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class SolanaListAllCandyMachinesExample
{
public static void Main()
{
Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
// Configure API key authorization: APIKeyID
Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
// Configure API key authorization: APISecretKey
Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");
var apiInstance = new SolanaCandyMachineApi(Configuration.Default);
try
{
// List all CMs
Object result = apiInstance.SolanaListAllCandyMachines();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SolanaCandyMachineApi.SolanaListAllCandyMachines: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
Object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
400 | Bad request (check response message) | - |
401 | Invalid API key pair in headers | - |
402 | Payment required. Occurs when you run out of API requests. Upgrade <a href="https://dashboard.theblockchainapi.com/billing\" target="_blank">here</a>. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<string> SolanaSearchCandyMachines (CandyMachineSearchRequest candyMachineSearchRequest = null)
Search CMs
<a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-candy-machine/search-candy-machines\" target="_blank">See examples (Python, JavaScript). With this endpoint, you can search candy machines by their symbol, name of NFTs, uuid, configuration address, and update authority. The output is a list of config addresses. You can also provide multiple search clauses, such as the update authority (update_authority=\"G17UmNGnMJ851x3M1JXocgpft1afcYedjPuFpo1ohhCk\"
) and symbol begins with "Sol" (symbol=\"Sol\", symbol_search_method='begins_with'
). Cost: 2 Credits
(<a href="#section/Pricing">See Pricing)
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class SolanaSearchCandyMachinesExample
{
public static void Main()
{
Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
// Configure API key authorization: APIKeyID
Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
// Configure API key authorization: APISecretKey
Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");
var apiInstance = new SolanaCandyMachineApi(Configuration.Default);
var candyMachineSearchRequest = new CandyMachineSearchRequest(); // CandyMachineSearchRequest | (optional)
try
{
// Search CMs
List<string> result = apiInstance.SolanaSearchCandyMachines(candyMachineSearchRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling SolanaCandyMachineApi.SolanaSearchCandyMachines: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
candyMachineSearchRequest | CandyMachineSearchRequest | [optional] |
List
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
400 | Bad request (check response message) | - |
401 | Invalid API key pair in headers | - |
402 | Payment required. Occurs when you run out of API requests. Upgrade <a href="https://dashboard.theblockchainapi.com/billing\" target="_blank">here</a>. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]