Skip to main content

DealsApi

All URIs are relative to https://api.estuary.tech

MethodHTTP requestDescription
dealEstimatePostPOST /deal/estimateEstimate the cost of a deal
dealInfoDealidGetGET /deal/info/{dealid}Get Deal Info
dealProposalPropcidGetGET /deal/proposal/{propcid}Get Proposal
dealQueryMinerGetGET /deal/query/{miner}Query Ask
dealStatusByProposalPropcidGetGET /deal/status-by-proposal/{propcid}Get Deal Status by PropCid
dealStatusMinerPropcidGetGET /deal/status/{miner}/{propcid}Deal Status
dealTransferInProgressGetGET /deal/transfer/in-progressTransfer In Progress
dealsFailuresGetGET /deals/failuresGet storage failures for user
dealsMakeMinerPostPOST /deals/make/{miner}Make Deal
dealsStatusDealGetGET /deals/status/{deal}Get Deal Status
publicDealsFailuresGetGET /public/deals/failuresGet storage failures
publicMinersStorageQueryMinerGetGET /public/miners/storage/query/{miner}Query Ask
# **dealEstimatePost** > dealEstimatePost(body)

Estimate the cost of a deal

This endpoint estimates the cost of a deal

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
MainEstimateDealBody body = new MainEstimateDealBody(); // MainEstimateDealBody | The size of the deal in bytes, the replication factor, and the duration of the deal in blocks
try {
apiInstance.dealEstimatePost(body);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealEstimatePost");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
bodyMainEstimateDealBodyThe size of the deal in bytes, the replication factor, and the duration of the deal in blocks

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealInfoDealidGet** > dealInfoDealidGet(dealid)

Get Deal Info

This endpoint returns the deal info for a deal

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
Integer dealid = 56; // Integer | Deal ID
try {
apiInstance.dealInfoDealidGet(dealid);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealInfoDealidGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
dealidIntegerDeal ID

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealProposalPropcidGet** > dealProposalPropcidGet(propcid)

Get Proposal

This endpoint returns the proposal for a deal

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String propcid = "propcid_example"; // String | Proposal CID
try {
apiInstance.dealProposalPropcidGet(propcid);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealProposalPropcidGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
propcidStringProposal CID

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealQueryMinerGet** > dealQueryMinerGet(miner)

Query Ask

This endpoint returns the ask for a given CID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String miner = "miner_example"; // String | CID
try {
apiInstance.dealQueryMinerGet(miner);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealQueryMinerGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
minerStringCID

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealStatusByProposalPropcidGet** > dealStatusByProposalPropcidGet(propcid)

Get Deal Status by PropCid

Get Deal Status by PropCid

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String propcid = "propcid_example"; // String | PropCid
try {
apiInstance.dealStatusByProposalPropcidGet(propcid);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealStatusByProposalPropcidGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
propcidStringPropCid

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealStatusMinerPropcidGet** > dealStatusMinerPropcidGet(miner, propcid)

Deal Status

This endpoint returns the status of a deal

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String miner = "miner_example"; // String | Miner
String propcid = "propcid_example"; // String | Proposal CID
try {
apiInstance.dealStatusMinerPropcidGet(miner, propcid);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealStatusMinerPropcidGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
minerStringMiner
propcidStringProposal CID

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealTransferInProgressGet** > dealTransferInProgressGet()

Transfer In Progress

This endpoint returns the in-progress transfers

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
try {
apiInstance.dealTransferInProgressGet();
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealTransferInProgressGet");
e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealsFailuresGet** > dealsFailuresGet()

Get storage failures for user

This endpoint returns a list of storage failures for user

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
try {
apiInstance.dealsFailuresGet();
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealsFailuresGet");
e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealsMakeMinerPost** > dealsMakeMinerPost(miner, dealRequest)

Make Deal

This endpoint makes a deal for a given content and miner

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String miner = "miner_example"; // String | Miner
String dealRequest = "dealRequest_example"; // String | Deal Request
try {
apiInstance.dealsMakeMinerPost(miner, dealRequest);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealsMakeMinerPost");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
minerStringMiner
dealRequestStringDeal Request

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **dealsStatusDealGet** > dealsStatusDealGet(deal)

Get Deal Status

This endpoint returns the status of a deal

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
Integer deal = 56; // Integer | Deal ID
try {
apiInstance.dealsStatusDealGet(deal);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#dealsStatusDealGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
dealIntegerDeal ID

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **publicDealsFailuresGet** > publicDealsFailuresGet()

Get storage failures

This endpoint returns a list of storage failures

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
try {
apiInstance.publicDealsFailuresGet();
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#publicDealsFailuresGet");
e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **publicMinersStorageQueryMinerGet** > publicMinersStorageQueryMinerGet(miner)

Query Ask

This endpoint returns the ask for a given CID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.DealsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: bearerAuth
ApiKeyAuth bearerAuth = (ApiKeyAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.setApiKeyPrefix("Token");

DealsApi apiInstance = new DealsApi();
String miner = "miner_example"; // String | CID
try {
apiInstance.publicMinersStorageQueryMinerGet(miner);
} catch (ApiException e) {
System.err.println("Exception when calling DealsApi#publicMinersStorageQueryMinerGet");
e.printStackTrace();
}

Parameters

NameTypeDescriptionNotes
minerStringCID

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json