import cobo_waas2
from cobo_waas2.models.create_report_request import CreateReportRequest
from cobo_waas2.models.report import Report
from cobo_waas2.rest import ApiException
from pprint import pprint
# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
# Replace `<YOUR_PRIVATE_KEY>` with your private key
api_private_key="<YOUR_PRIVATE_KEY>",
# Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cobo_waas2.PaymentApi(api_client)
create_report_request = cobo_waas2.CreateReportRequest(
start_time=1764237462,
end_time=1764237462,
report_export_format="CSV",
report_types=["Order"],
)
try:
# Generate reports
api_response = api_instance.create_report(
create_report_request=create_report_request
)
print("The response of PaymentApi->create_report:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PaymentApi->create_report: %s\n" % e)
// Import classes:
import com.cobo.waas2.ApiClient;
import com.cobo.waas2.ApiException;
import com.cobo.waas2.Configuration;
import com.cobo.waas2.Env;
import com.cobo.waas2.api.PaymentApi;
import com.cobo.waas2.model.*;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Select the development environment. To use the production environment, replace `Env.DEV` with
// `Env.PROD
defaultClient.setEnv(Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
PaymentApi apiInstance = new PaymentApi();
CreateReportRequest createReportRequest =
new CreateReportRequest()
.startTime(1764237462)
.endTime(1764237462)
.reportExportFormat(ReportExportFormat.CSV)
.reportTypes(Arrays.asList(ReportType.ORDER));
try {
Report result = apiInstance.createReport(createReportRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentApi#createReport");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
package main
import (
"context"
"fmt"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
"os"
)
func main() {
createReportRequest := *coboWaas2.NewCreateReportRequest(int32(1764237462), int32(1764237462), coboWaas2.ReportExportFormat("CSV"), []coboWaas2.ReportType{coboWaas2.ReportType("Order")})
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.PaymentAPI.CreateReport(ctx).
CreateReportRequest(createReportRequest).
Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.CreateReport``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateReport`: Report
fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.CreateReport`: %v\n", resp)
}
const CoboWaas2 = require("@cobo/cobo-waas2");
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance;
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.PaymentApi();
const opts = {
CreateReportRequest: CoboWaas2.CreateReportRequest.constructFromObject({
start_time: 1764237462,
end_time: 1764237462,
report_export_format: "CSV",
report_types: ["Order"],
}),
};
apiInstance.createReport(opts).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"report_id": "123e4567-e89b-12d3-a456-426614174004",
"report_types": [
"OrderIn"
],
"start_time": 1764237462,
"end_time": 1764237462,
"created_timestamp": 1744689600,
"report_export_format": "CSV",
"report_status": "Completed",
"initiator": "b2ae1b5aaade686c968ef2bbd31cc75ba94e5a85fd9cb0b85b81dcc15f920e9d",
"report_url": "https://cobo.com/reports/123e4567-e89b-12d3-a456-426614174004"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}Generate reports
This operation generates reports for a variety of payment activities, including pay-ins, payouts, and commission fees. The response does not guarantee a download URL. To retrieve a temporary download URL for a completed report, call download report operation.
report_types, report scope, exported field differences, and report-specific usage notes, see Reports.import cobo_waas2
from cobo_waas2.models.create_report_request import CreateReportRequest
from cobo_waas2.models.report import Report
from cobo_waas2.rest import ApiException
from pprint import pprint
# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
# Replace `<YOUR_PRIVATE_KEY>` with your private key
api_private_key="<YOUR_PRIVATE_KEY>",
# Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cobo_waas2.PaymentApi(api_client)
create_report_request = cobo_waas2.CreateReportRequest(
start_time=1764237462,
end_time=1764237462,
report_export_format="CSV",
report_types=["Order"],
)
try:
# Generate reports
api_response = api_instance.create_report(
create_report_request=create_report_request
)
print("The response of PaymentApi->create_report:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PaymentApi->create_report: %s\n" % e)
// Import classes:
import com.cobo.waas2.ApiClient;
import com.cobo.waas2.ApiException;
import com.cobo.waas2.Configuration;
import com.cobo.waas2.Env;
import com.cobo.waas2.api.PaymentApi;
import com.cobo.waas2.model.*;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Select the development environment. To use the production environment, replace `Env.DEV` with
// `Env.PROD
defaultClient.setEnv(Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
PaymentApi apiInstance = new PaymentApi();
CreateReportRequest createReportRequest =
new CreateReportRequest()
.startTime(1764237462)
.endTime(1764237462)
.reportExportFormat(ReportExportFormat.CSV)
.reportTypes(Arrays.asList(ReportType.ORDER));
try {
Report result = apiInstance.createReport(createReportRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentApi#createReport");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
package main
import (
"context"
"fmt"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
"os"
)
func main() {
createReportRequest := *coboWaas2.NewCreateReportRequest(int32(1764237462), int32(1764237462), coboWaas2.ReportExportFormat("CSV"), []coboWaas2.ReportType{coboWaas2.ReportType("Order")})
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.PaymentAPI.CreateReport(ctx).
CreateReportRequest(createReportRequest).
Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.CreateReport``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateReport`: Report
fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.CreateReport`: %v\n", resp)
}
const CoboWaas2 = require("@cobo/cobo-waas2");
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance;
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.PaymentApi();
const opts = {
CreateReportRequest: CoboWaas2.CreateReportRequest.constructFromObject({
start_time: 1764237462,
end_time: 1764237462,
report_export_format: "CSV",
report_types: ["Order"],
}),
};
apiInstance.createReport(opts).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
{
"report_id": "123e4567-e89b-12d3-a456-426614174004",
"report_types": [
"OrderIn"
],
"start_time": 1764237462,
"end_time": 1764237462,
"created_timestamp": 1744689600,
"report_export_format": "CSV",
"report_status": "Completed",
"initiator": "b2ae1b5aaade686c968ef2bbd31cc75ba94e5a85fd9cb0b85b81dcc15f920e9d",
"report_url": "https://cobo.com/reports/123e4567-e89b-12d3-a456-426614174004"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}{
"error_code": 123,
"error_message": "<string>",
"error_id": "0b6ddf19083c4bd1a9ca01bec44b24dd"
}import cobo_waas2
from cobo_waas2.models.create_report_request import CreateReportRequest
from cobo_waas2.models.report import Report
from cobo_waas2.rest import ApiException
from pprint import pprint
# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
# Replace `<YOUR_PRIVATE_KEY>` with your private key
api_private_key="<YOUR_PRIVATE_KEY>",
# Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cobo_waas2.PaymentApi(api_client)
create_report_request = cobo_waas2.CreateReportRequest(
start_time=1764237462,
end_time=1764237462,
report_export_format="CSV",
report_types=["Order"],
)
try:
# Generate reports
api_response = api_instance.create_report(
create_report_request=create_report_request
)
print("The response of PaymentApi->create_report:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PaymentApi->create_report: %s\n" % e)
// Import classes:
import com.cobo.waas2.ApiClient;
import com.cobo.waas2.ApiException;
import com.cobo.waas2.Configuration;
import com.cobo.waas2.Env;
import com.cobo.waas2.api.PaymentApi;
import com.cobo.waas2.model.*;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Select the development environment. To use the production environment, replace `Env.DEV` with
// `Env.PROD
defaultClient.setEnv(Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
defaultClient.setPrivKey("<YOUR_PRIVATE_KEY>");
PaymentApi apiInstance = new PaymentApi();
CreateReportRequest createReportRequest =
new CreateReportRequest()
.startTime(1764237462)
.endTime(1764237462)
.reportExportFormat(ReportExportFormat.CSV)
.reportTypes(Arrays.asList(ReportType.ORDER));
try {
Report result = apiInstance.createReport(createReportRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentApi#createReport");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
package main
import (
"context"
"fmt"
coboWaas2 "github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2"
"github.com/CoboGlobal/cobo-waas2-go-sdk/cobo_waas2/crypto"
"os"
)
func main() {
createReportRequest := *coboWaas2.NewCreateReportRequest(int32(1764237462), int32(1764237462), coboWaas2.ReportExportFormat("CSV"), []coboWaas2.ReportType{coboWaas2.ReportType("Order")})
configuration := coboWaas2.NewConfiguration()
// Initialize the API client
apiClient := coboWaas2.NewAPIClient(configuration)
ctx := context.Background()
// Select the development environment. To use the production environment, replace coboWaas2.DevEnv with coboWaas2.ProdEnv
ctx = context.WithValue(ctx, coboWaas2.ContextEnv, coboWaas2.DevEnv)
// Replace `<YOUR_PRIVATE_KEY>` with your private key
ctx = context.WithValue(ctx, coboWaas2.ContextPortalSigner, crypto.Ed25519Signer{
Secret: "<YOUR_PRIVATE_KEY>",
})
resp, r, err := apiClient.PaymentAPI.CreateReport(ctx).
CreateReportRequest(createReportRequest).
Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PaymentAPI.CreateReport``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateReport`: Report
fmt.Fprintf(os.Stdout, "Response from `PaymentAPI.CreateReport`: %v\n", resp)
}
const CoboWaas2 = require("@cobo/cobo-waas2");
// Initialize the API client
const apiClient = CoboWaas2.ApiClient.instance;
// Select the development environment. To use the production environment, replace `Env.DEV` with `Env.PROD`
apiClient.setEnv(CoboWaas2.Env.DEV);
// Replace `<YOUR_PRIVATE_KEY>` with your private key
apiClient.setPrivateKey("<YOUR_PRIVATE_KEY>");
// Call the API
const apiInstance = new CoboWaas2.PaymentApi();
const opts = {
CreateReportRequest: CoboWaas2.CreateReportRequest.constructFromObject({
start_time: 1764237462,
end_time: 1764237462,
report_export_format: "CSV",
report_types: ["Order"],
}),
};
apiInstance.createReport(opts).then(
(data) => {
console.log("API called successfully. Returned data: " + data);
},
(error) => {
console.error(error);
},
);
Authorizations
The API key. For more details, refer to API key.
In the API playground, enter your API secret, and your API key will be accordingly calculated.
Body
The request body to create payment reports.
The start time of the report. Unix timestamp measured in seconds.
1764237462
The end time of the report. Unix timestamp measured in seconds.
1764237462
The format of the report.
CSV: The report will be exported as a CSV file.XLSX: The report will be exported as an XLSX file.ZIP: The report will be exported as a ZIP file which contains multiple files.PDF: The report will be exported as a PDF file, only supported for balance snapshot report.
CSV, XLSX, ZIP, PDF "CSV"
The type of the report.
Order: Summary of all pay-in orders.OrderTransaction: Summary of all pay-in order transactions.TopUpTransaction: Summary of all top-up transactions.PayinWeeklyStatement: Weekly report of all pay-ins (including order mode and top-up mode).PayinDailyStatement: Daily report of all pay-ins (including order mode and top-up mode).CryptoPayout: Summary of all crypto payout transactions.OffRamp: Summary of all fiat off-ramp transactions.Refund: Summary of all refund transactions.PayoutWeeklyStatement: Weekly report of all payouts (including crypto payouts, fiat off-ramps, and refunds).PayoutDailyStatement: Daily report of all payouts (including crypto payouts, fiat off-ramps, and refunds).PayinCommissionFee: Summary of all commission fees for pay-ins.PayoutCommissionFee: Summary of all commission fees for payouts.BalanceChange: Summary of balance changes for all accounts.Summary: Summary of all pay-ins, payouts, and commission fees.BulkSend: Transaction summary of bulk send.
Order, OrderTransaction, TopUpTransaction, PayinWeeklyStatement, PayinDailyStatement, CryptoPayout, OffRamp, Refund, PayoutWeeklyStatement, PayoutDailyStatement, PayinCommissionFee, PayoutCommissionFee, BalanceChange, Summary, BulkSend Optional filter to include only items related to specified token IDs in the report.
["ETH_USDT", "ETH_USDC"]
Response
Payment report created successfully.
The report ID generated by Cobo.
"123e4567-e89b-12d3-a456-426614174004"
The types of the report.
The type of the report.
Order: Summary of all pay-in orders.OrderTransaction: Summary of all pay-in order transactions.TopUpTransaction: Summary of all top-up transactions.PayinWeeklyStatement: Weekly report of all pay-ins (including order mode and top-up mode).PayinDailyStatement: Daily report of all pay-ins (including order mode and top-up mode).CryptoPayout: Summary of all crypto payout transactions.OffRamp: Summary of all fiat off-ramp transactions.Refund: Summary of all refund transactions.PayoutWeeklyStatement: Weekly report of all payouts (including crypto payouts, fiat off-ramps, and refunds).PayoutDailyStatement: Daily report of all payouts (including crypto payouts, fiat off-ramps, and refunds).PayinCommissionFee: Summary of all commission fees for pay-ins.PayoutCommissionFee: Summary of all commission fees for payouts.BalanceChange: Summary of balance changes for all accounts.Summary: Summary of all pay-ins, payouts, and commission fees.BulkSend: Transaction summary of bulk send.
Order, OrderTransaction, TopUpTransaction, PayinWeeklyStatement, PayinDailyStatement, CryptoPayout, OffRamp, Refund, PayoutWeeklyStatement, PayoutDailyStatement, PayinCommissionFee, PayoutCommissionFee, BalanceChange, Summary, BulkSend The start time of the report. Unix timestamp measured in seconds.
1764237462
The end time of the report. Unix timestamp measured in seconds.
1764237462
The created time of the report. Unix timestamp measured in seconds.
1744689600
The format of the report.
CSV: The report will be exported as a CSV file.XLSX: The report will be exported as an XLSX file.ZIP: The report will be exported as a ZIP file which contains multiple files.PDF: The report will be exported as a PDF file, only supported for balance snapshot report.
CSV, XLSX, ZIP, PDF "CSV"
The status of the report.
Processing: The report is being generated.Completed: The report has been completed.Failed: The report has failed.
Processing, Completed, Failed "Completed"
The initiator of this report. Usually the API key used to generate the report.
"b2ae1b5aaade686c968ef2bbd31cc75ba94e5a85fd9cb0b85b81dcc15f920e9d"
The url of the payment report. (This field will be deprecated, please use download report operation to get the temporary download URL.)
"https://cobo.com/reports/123e4567-e89b-12d3-a456-426614174004"
