All URIs are relative to https://api.builtbybit.com
| Method | HTTP request | Description |
|---|---|---|
| getV2Events | GET /v2/events | Fetch a list of pending events |
| postV2EventsComplete | POST /v2/events/complete | Mark events as complete |
GetV2Events200Response getV2Events(page, perPage, with)
Fetch a list of pending events
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EventsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.builtbybit.com");
// Configure API key authorization: token
ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token");
token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//token.setApiKeyPrefix("Token");
EventsApi apiInstance = new EventsApi(defaultClient);
Integer page = 56; // Integer | The page number/offset to return items for.
Integer perPage = 25; // Integer | The number of items per page to return.
String with = "with_example"; // String | A comma-separated list of supported 'with hints'. See model & endpoint-level docs for more info.
try {
GetV2Events200Response result = apiInstance.getV2Events(page, perPage, with);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EventsApi#getV2Events");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| page | Integer | The page number/offset to return items for. | [optional] |
| perPage | Integer | The number of items per page to return. | [optional] [default to 25] |
| with | String | A comma-separated list of supported 'with hints'. See model & endpoint-level docs for more info. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
PostV2EventsComplete200Response postV2EventsComplete(postV2EventsCompleteRequest)
Mark events as complete
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EventsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.builtbybit.com");
// Configure API key authorization: token
ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token");
token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//token.setApiKeyPrefix("Token");
EventsApi apiInstance = new EventsApi(defaultClient);
PostV2EventsCompleteRequest postV2EventsCompleteRequest = new PostV2EventsCompleteRequest(); // PostV2EventsCompleteRequest |
try {
PostV2EventsComplete200Response result = apiInstance.postV2EventsComplete(postV2EventsCompleteRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EventsApi#postV2EventsComplete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| postV2EventsCompleteRequest | PostV2EventsCompleteRequest | [optional] |
PostV2EventsComplete200Response
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |