# TradingViewWebhookAPIApi

All URIs are relative to *https://api.metacopier.io*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**deleteStoredData**](#deletestoreddata) | **DELETE** /rest/api/v1/webhooks/tradingview/accounts/{accountId}/data/{dataId} | Delete stored data|
|[**getRequestStatus**](#getrequeststatus) | **GET** /rest/api/v1/webhooks/tradingview/requests/{requestId}/status | Get webhook request status|
|[**getStoredData**](#getstoreddata) | **GET** /rest/api/v1/webhooks/tradingview/accounts/{accountId}/data | List stored TradingView data|
|[**getStoredDataById**](#getstoreddatabyid) | **GET** /rest/api/v1/webhooks/tradingview/accounts/{accountId}/data/{dataId} | Get specific stored data|
|[**handleWebhook**](#handlewebhook) | **POST** /rest/api/v1/webhooks/tradingview/accounts/{accountId} | Handle TradingView webhook|

# **deleteStoredData**
> object deleteStoredData()

Delete specific stored data by ID.

### Example

```typescript
import {
    TradingViewWebhookAPIApi,
    Configuration
} from 'js-metacopier-api';

const configuration = new Configuration();
const apiInstance = new TradingViewWebhookAPIApi(configuration);

let accountId: string; // (default to undefined)
let dataId: string; // (default to undefined)

const { status, data } = await apiInstance.deleteStoredData(
    accountId,
    dataId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountId** | [**string**] |  | defaults to undefined|
| **dataId** | [**string**] |  | defaults to undefined|


### Return type

**object**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getRequestStatus**
> TradingViewWebhookResponseDTO getRequestStatus()

Check the processing status of a queued webhook request.

### Example

```typescript
import {
    TradingViewWebhookAPIApi,
    Configuration
} from 'js-metacopier-api';

const configuration = new Configuration();
const apiInstance = new TradingViewWebhookAPIApi(configuration);

let requestId: string; // (default to undefined)

const { status, data } = await apiInstance.getRequestStatus(
    requestId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **requestId** | [**string**] |  | defaults to undefined|


### Return type

**TradingViewWebhookResponseDTO**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getStoredData**
> object getStoredData()

Retrieve data stored via the \'store\' webhook action.

### Example

```typescript
import {
    TradingViewWebhookAPIApi,
    Configuration
} from 'js-metacopier-api';

const configuration = new Configuration();
const apiInstance = new TradingViewWebhookAPIApi(configuration);

let accountId: string; // (default to undefined)
let limit: number; // (optional) (default to 50)
let skip: number; // (optional) (default to 0)

const { status, data } = await apiInstance.getStoredData(
    accountId,
    limit,
    skip
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountId** | [**string**] |  | defaults to undefined|
| **limit** | [**number**] |  | (optional) defaults to 50|
| **skip** | [**number**] |  | (optional) defaults to 0|


### Return type

**object**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **getStoredDataById**
> object getStoredDataById()

Retrieve specific stored data by ID.

### Example

```typescript
import {
    TradingViewWebhookAPIApi,
    Configuration
} from 'js-metacopier-api';

const configuration = new Configuration();
const apiInstance = new TradingViewWebhookAPIApi(configuration);

let accountId: string; // (default to undefined)
let dataId: string; // (default to undefined)

const { status, data } = await apiInstance.getStoredDataById(
    accountId,
    dataId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **accountId** | [**string**] |  | defaults to undefined|
| **dataId** | [**string**] |  | defaults to undefined|


### Return type

**object**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **handleWebhook**
> TradingViewWebhookResponseDTO handleWebhook(body)

Receives webhook alerts from TradingView and queues them for asynchronous processing. Returns 202 Accepted with a requestId that can be used to check status.

### Example

```typescript
import {
    TradingViewWebhookAPIApi,
    Configuration
} from 'js-metacopier-api';

const configuration = new Configuration();
const apiInstance = new TradingViewWebhookAPIApi(configuration);

let accountId: string; // (default to undefined)
let body: string; //

const { status, data } = await apiInstance.handleWebhook(
    accountId,
    body
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **body** | **string**|  | |
| **accountId** | [**string**] |  | defaults to undefined|


### Return type

**TradingViewWebhookResponseDTO**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth)

### HTTP request headers

 - **Content-Type**: application/json, text/plain
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

