com.usemoon.MoonSDK.Api.BitcoinApi
All URIs are relative to https://beta.usemoon.ai
Method
HTTP request
Description
GET /bitcoin/{accountName}
POST /bitcoin/{accountName}/sign-tx
CreateBitcoinAccount
AccountAPIResponse CreateBitcoinAccount (string authorization, BitcoinInput bitcoinInput)
Example
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class CreateBitcoinAccountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new BitcoinApi(config);
var authorization = "authorization_example"; // string |
var bitcoinInput = new BitcoinInput(); // BitcoinInput |
try
{
AccountAPIResponse result = apiInstance.CreateBitcoinAccount(authorization, bitcoinInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.CreateBitcoinAccount: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the CreateBitcoinAccountWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AccountAPIResponse> response = apiInstance.CreateBitcoinAccountWithHttpInfo(authorization, bitcoinInput);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.CreateBitcoinAccountWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
AccountAPIResponse
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetBitcoinAccount
AccountAPIResponse GetBitcoinAccount (string authorization, string accountName)
Example
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class GetBitcoinAccountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new BitcoinApi(config);
var authorization = "authorization_example"; // string |
var accountName = "accountName_example"; // string |
try
{
AccountAPIResponse result = apiInstance.GetBitcoinAccount(authorization, accountName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.GetBitcoinAccount: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetBitcoinAccountWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AccountAPIResponse> response = apiInstance.GetBitcoinAccountWithHttpInfo(authorization, accountName);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.GetBitcoinAccountWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
AccountAPIResponse
Authorization
ApiKeyAuth, BearerAuth
Content-Type: Not defined
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListBitcoinAccounts
AccountAPIResponse ListBitcoinAccounts (string authorization)
Example
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class ListBitcoinAccountsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new BitcoinApi(config);
var authorization = "authorization_example"; // string |
try
{
AccountAPIResponse result = apiInstance.ListBitcoinAccounts(authorization);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.ListBitcoinAccounts: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the ListBitcoinAccountsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AccountAPIResponse> response = apiInstance.ListBitcoinAccountsWithHttpInfo(authorization);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.ListBitcoinAccountsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
AccountAPIResponse
Authorization
ApiKeyAuth, BearerAuth
Content-Type: Not defined
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SignBitcoinTransaction
BitcoinAPIResponse SignBitcoinTransaction (string authorization, string accountName, BitcoinTransactionInput bitcoinTransactionInput)
Example
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class SignBitcoinTransactionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new BitcoinApi(config);
var authorization = "authorization_example"; // string |
var accountName = "accountName_example"; // string |
var bitcoinTransactionInput = new BitcoinTransactionInput(); // BitcoinTransactionInput |
try
{
BitcoinAPIResponse result = apiInstance.SignBitcoinTransaction(authorization, accountName, bitcoinTransactionInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.SignBitcoinTransaction: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the SignBitcoinTransactionWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<BitcoinAPIResponse> response = apiInstance.SignBitcoinTransactionWithHttpInfo(authorization, accountName, bitcoinTransactionInput);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BitcoinApi.SignBitcoinTransactionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
BitcoinAPIResponse
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]