-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connectors): add TradingView connector, handle webhook test failure
- Loading branch information
Showing
29 changed files
with
271 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...modules/billing/components/ConfigItem.tsx → apps/web/shared/components/KeyValueItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Write short descriptions for app which will be used as a plugin to create flows. | ||
|
||
Examples: | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"extends": ["../../../.eslintrc.base.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.json"], | ||
"parser": "jsonc-eslint-parser", | ||
"rules": { | ||
"@nx/dependency-checks": "error" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# connectors-trading-view | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Building | ||
|
||
Run `nx build connectors-trading-view` to build the library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@linkerry/trading-view", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"tslib": "^2.3.0" | ||
}, | ||
"type": "commonjs", | ||
"main": "./src/index.js", | ||
"typings": "./src/index.d.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "connectors-trading-view", | ||
"$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "libs/connectors/trading-view/src", | ||
"projectType": "library", | ||
"tags": [], | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/js:tsc", | ||
"outputs": ["{options.outputPath}"], | ||
"options": { | ||
"outputPath": "dist/libs/connectors/trading-view", | ||
"main": "libs/connectors/trading-view/src/index.ts", | ||
"tsConfig": "libs/connectors/trading-view/tsconfig.lib.json", | ||
"assets": ["libs/connectors/trading-view/*.md"], | ||
"buildableProjectDepsInPackageJsonType": "dependencies", | ||
"updateBuildableProjectDepsInPackageJson": true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* eslint-disable no-useless-escape */ | ||
|
||
export const instructions = { | ||
instructions_webhook_url: `You need to paste webhook URL in the "Notification" tab at Trading View alert. | ||
This URL should be: *https://api.linkerry.com/api/v1/webhooks/\<flow-id\>*. | ||
Replace \<flow-id\> to the current flow ID. You can find this ID by clicking the **"Details"** button on the top menu. For **testing purpose**, you must append "/simulate" to the end of URL, so it should looks like *https://api.linkerry.com/api/v1/webhooks/\<flow-id\>/simulate*. After test back to the previous URL without "/simulate". | ||
**Don't show this URLs to anybody**.`, | ||
instructions_message: `You need to prepare the correct webhook message. Go to the "Settings" tab for your TradingView alert and fill in the "Message" input. It must be a valid JSON. You can refer to this [TradingView tutorial](https://www.tradingview.com/support/solutions/43000529348-about-webhooks/) on how to create this message and include the necessary data. | ||
This JSON data will be available in the next flow steps. You can use dynamic variables provided by TradingView. Check [this article](https://www.tradingview.com/support/solutions/43000531021-how-to-use-a-variable-value-in-alert/) to learn how to use them. | ||
Correct message can looks like: | ||
\`\`\` | ||
{ | ||
"symbol": "{{ticker}}", | ||
"price": "{{close}}", | ||
"price_time": "{{time}}", | ||
"webhook_time": "{{timenow}}", | ||
"my_fixed_message": "This is fixed message, it can be use later in flow for example to send to Telegram", | ||
"to_buy_at_CEX": "BTC/USDT" | ||
} | ||
\`\`\``, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ConnectorAuth, createConnector } from '@linkerry/connectors-framework' | ||
import { tradingViewNewAlert } from './triggers/new-alert' | ||
|
||
export const telegramBot = createConnector({ | ||
displayName: 'Trading View', | ||
description: 'Live advanced charting and analysis for financial markets', | ||
minimumSupportedRelease: '0.0.0', | ||
logoUrl: '/images/connectors/trading-view.png', | ||
tags: ['alerts', 'chart', 'cryptocurrency', 'data feed', 'exchange', 'stock market', 'trading'], | ||
auth: ConnectorAuth.None(), | ||
actions: [ | ||
], | ||
triggers: [tradingViewNewAlert], | ||
}) |
Oops, something went wrong.