Create webhook#
About#
Creates a new webhook. The webhook can be used for an external app (e.g. TradingView) to submit trading signals to CopyFactory.
POST /users/current/configuration/strategies/:strategyId/webhooks
For more information see Swagger documentation
Headers#
Name | Type | Required | Description |
---|---|---|---|
auth-token | string | Yes | authorization token. See Authentication & authorization |
Path parameters#
Name | Type | Required | Description |
---|---|---|---|
strategyId | string | Yes | strategy id |
Body#
Webhook payload schema: NewWebhook
Response#
Responses:
- 201 - Webhook created successfully. Response schema: WebhookIdAndUrl
- 400 - Webhook payload validation failed. Response schema: Error
- 401 - Authorization failed. Response schema: Error
- 404 - CopyFactory strategy with the specified id value not found. Response schema: Error
Examples#
Example request:
curl -X POST --header 'Accept: application/json' --header 'auth-token: token' -d '{
"magic": 100,
"symbolMapping": [{"to": "EURUSD", "from": "EURUSD.m"}]
}' 'https://copyfactory-api-v1.new-york.agiliumtrade.ai/users/current/configuration/strategies/AeRF/webhooks'
Example response:
{
"url": "https://copyfactory-api-v1.new-york.agiliumtrade.ai/webhooks/bsYA4ucPTt2ZBK1ynVx7Ef6kCdaUmSgL",
"id": "bsYA4ucPTt2ZBK1ynVx7Ef6kCdaUmSgL"
}