Skip to content

Commit

Permalink
Added new Finalto EA (#3225)
Browse files Browse the repository at this point in the history
* add finalto EA

* update timestamp logic and test snapshots

* use uuid for subIds

---------

Co-authored-by: cl-ea <93770670+cl-ea@users.noreply.github.com>
  • Loading branch information
karen-stepanyan and cl-ea authored Mar 18, 2024
1 parent 5eb9af8 commit dc27a56
Showing 22 changed files with 859 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-boats-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/finalto-adapter': major
---

Initial version of the EA
24 changes: 24 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Empty file.
56 changes: 56 additions & 0 deletions packages/sources/finalto/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# FINALTO

![0.0.0](https://img.shields.io/github/package-json/v/smartcontractkit/external-adapters-js?filename=packages/sources/finalto/package.json) ![v3](https://img.shields.io/badge/framework%20version-v3-blueviolet)

This document was generated automatically. Please see [README Generator](../../scripts#readme-generator) for more info.

## Environment Variables

| Required? | Name | Description | Type | Options | Default |
| :-------: | :-------------: | :---------------------------: | :----: | :-----: | :-----: |
|| WS_API_USERNAME | API username for WS endpoint | string | | |
|| WS_API_PASSWORD | API password for WS endpoint | string | | |
|| WS_API_ENDPOINT | WS endpoint for Data Provider | string | | |

---

## Data Provider Rate Limits

There are no rate limits for this adapter.

---

## Input Parameters

| Required? | Name | Description | Type | Options | Default |
| :-------: | :------: | :-----------------: | :----: | :-----------------------------------------------------------------------------: | :-----: |
| | endpoint | The endpoint to use | string | [commodities](#forex-endpoint), [forex](#forex-endpoint), [fx](#forex-endpoint) | `forex` |

## Forex Endpoint

Supported names for this endpoint are: `commodities`, `forex`, `fx`.

### Input Params

| Required? | Name | Aliases | Description | Type | Options | Default | Depends On | Not Valid With |
| :-------: | :---: | :------------: | :--------------------------------------------: | :----: | :-----: | :-----: | :--------: | :------------: |
|| base | `coin`, `from` | The symbol of symbols of the currency to query | string | | | | |
|| quote | `market`, `to` | The symbol of the currency to convert to | string | | | | |

### Example

Request:

```json
{
"data": {
"endpoint": "forex",
"base": "GBP",
"quote": "USD"
}
}
```

---

MIT License
44 changes: 44 additions & 0 deletions packages/sources/finalto/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "@chainlink/finalto-adapter",
"version": "0.0.0",
"description": "Chainlink finalto adapter.",
"keywords": [
"Chainlink",
"LINK",
"blockchain",
"oracle",
"finalto"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"repository": {
"url": "https://github.com/smartcontractkit/external-adapters-js",
"type": "git"
},
"license": "MIT",
"scripts": {
"clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo",
"prepack": "yarn build",
"build": "tsc -b",
"server": "node -e 'require(\"./index.js\").server()'",
"server:dist": "node -e 'require(\"./dist/index.js\").server()'",
"start": "yarn server:dist"
},
"devDependencies": {
"@sinonjs/fake-timers": "9.1.2",
"@types/jest": "27.5.2",
"@types/node": "16.11.68",
"@types/sinonjs__fake-timers": "8.1.5",
"@types/uuid": "8.3.4",
"nock": "13.5.4",
"typescript": "5.0.4"
},
"dependencies": {
"@chainlink/external-adapter-framework": "0.33.4",
"tslib": "2.4.1",
"uuid": "^8.3.0"
}
}
Loading

0 comments on commit dc27a56

Please sign in to comment.