100x-client
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -26,1 +26,8 @@ # 100x Client SDK | ||
- Users can now hot swap between sub-accounts. | ||
## 1.1.0 | ||
- Scripts and dev dependencies are now cleaned from package.json before building the package. | ||
- README updates. | ||
- Mainnet contracts now up to date. | ||
- No longer mocking contract addresses and API URL. |
@@ -411,3 +411,3 @@ import { Environment as Environment$1, OrderType, TimeInForce, Interval, OrderStatus, MarginAssets } from './enums.js'; | ||
* @param [orderArgs.timeInForce] (Optional) The time in force for the order (default: FOK). Use the {@link TimeInForce} enum. | ||
* @param [orderArgs.slippage] (Optional) The percentage by which to adjust the price when orderType is {@link OrderType.MARKET}. | ||
* @param [orderArgs.slippage] (Optional) The percentage by which to adjust the price when orderType is {@link OrderType.MARKET} (default: 2.5%). | ||
* @returns A promise that resolves to an object with either the order or an error. | ||
@@ -414,0 +414,0 @@ * @throws {Error} Thrown if an error occurs during the order process. The error object may contain details from the API response or a generic message. |
@@ -314,4 +314,4 @@ import logger, { levels } from 'pino'; | ||
var CIAO_ADDRESS = { | ||
mainnet: "0x63bD0ca355Cfc117F5176E5eF3e34A6D60081937", | ||
testnet: "0x0c3b9472b3923CfE199bAE24B5f5bD75FAD2bae9" | ||
mainnet: "0x1baebee6b00b3f559b0ff0719b47e0af22a6bfc4", | ||
testnet: "0x0c3b9472b3923cfe199bae24b5f5bd75fad2bae9" | ||
}; | ||
@@ -322,3 +322,3 @@ var ciao_default = CIAO_ADDRESS; | ||
var MARGIN_ASSETS = { | ||
mainnet: { ["USDB" /* USDB */]: "0x79a59c326c715ac2d31c169c85d1232319e341ce" }, | ||
mainnet: { ["USDB" /* USDB */]: "0x4300000000000000000000000000000000000003" }, | ||
testnet: { ["USDB" /* USDB */]: "0x79a59c326c715ac2d31c169c85d1232319e341ce" } | ||
@@ -333,4 +333,4 @@ }; | ||
var VERIFIER_ADDRESS = { | ||
mainnet: "0x65CbB566D1A6E60107c0c7888761de1AdFa1ccC0", | ||
testnet: "0x02Ca4fcB63E2D3C89fa20D86ccDcfc540c683545" | ||
mainnet: "0x691a5fc3a81a144e36c6c4fbca1fc82843c80d0d", | ||
testnet: "0x02ca4fcb63e2d3c89fa20d86ccdcfc540c683545" | ||
}; | ||
@@ -1066,3 +1066,3 @@ var verifier_default = VERIFIER_ADDRESS; | ||
* @param [orderArgs.timeInForce] (Optional) The time in force for the order (default: FOK). Use the {@link TimeInForce} enum. | ||
* @param [orderArgs.slippage] (Optional) The percentage by which to adjust the price when orderType is {@link OrderType.MARKET}. | ||
* @param [orderArgs.slippage] (Optional) The percentage by which to adjust the price when orderType is {@link OrderType.MARKET} (default: 2.5%). | ||
* @returns A promise that resolves to an object with either the order or an error. | ||
@@ -1069,0 +1069,0 @@ * @throws {Error} Thrown if an error occurs during the order process. The error object may contain details from the API response or a generic message. |
{ | ||
"name": "100x-client", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "A TypesScript SDK for the 100x exchange API.", | ||
@@ -51,13 +51,2 @@ "keywords": [ | ||
], | ||
"scripts": { | ||
"build": "tsup --dts", | ||
"dev": "tsup --watch --no-dts", | ||
"postinstall": "echo removed in build", | ||
"lint": "eslint", | ||
"sandbox": "tsx src/sandbox.ts", | ||
"test": "vitest -c vitest/vitest.config", | ||
"test:cov": "yarn test --coverage --silent", | ||
"test:mutations": "stryker run", | ||
"upgrade": "yarn upgrade-interactive --latest" | ||
}, | ||
"dependencies": { | ||
@@ -68,29 +57,2 @@ "pino": "^8.19.0", | ||
}, | ||
"devDependencies": { | ||
"@stryker-mutator/api": "^8.2.6", | ||
"@stryker-mutator/core": "^8.2.6", | ||
"@stryker-mutator/typescript-checker": "^8.2.6", | ||
"@stryker-mutator/vitest-runner": "^8.2.6", | ||
"@types/node": "^18.19.29", | ||
"@typescript-eslint/eslint-plugin": "^7.5.0", | ||
"@typescript-eslint/parser": "^7.5.0", | ||
"@vitest/coverage-v8": "^1.4.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jsdoc": "^48.2.3", | ||
"eslint-plugin-unused-imports": "^3.1.0", | ||
"husky": "^9.0.11", | ||
"lint-staged": "^15.2.2", | ||
"markdownlint-cli": "^0.39.0", | ||
"prettier": "^3.2.5", | ||
"ts-node": "^10.9.2", | ||
"tsup": "^8.0.2", | ||
"tsx": "^4.7.2", | ||
"typescript": "^5.4.3", | ||
"typescript-eslint": "^7.5.0", | ||
"vitest": "^1.4.0", | ||
"vitest-fetch-mock": "^0.2.2" | ||
}, | ||
"engines": { | ||
@@ -97,0 +59,0 @@ "node": ">=16.0.0" |
<p align="center"> | ||
<img alt="100x Logo" src="https://app.100x.finance/brand/100x-bg-blue.webp" /> | ||
<img alt="100x Logo" src="https://app.100x.finance/brand/100x-trade-perps.webp" /> | ||
</p> | ||
![Build](https://img.shields.io/github/actions/workflow/status/MeanBoyCousin/100xClient/release.yml?style=flat-square&label=Build&color=%234177f6) | ||
![NPM Version](https://img.shields.io/npm/v/100x-client?style=flat-square&label=NPM&color=%234177f6) | ||
![Discord](https://img.shields.io/discord/1203621012659249192?style=flat-square&logo=discord&logoColor=%23fff&label=Discord&color=%234177f6) | ||
![Build](https://img.shields.io/github/actions/workflow/status/MeanBoyCousin/100xClient/release.yml?style=flat-square&label=Build&color=%234177f6&link=https://github.com/MeanBoyCousin/100xClient/actions/workflows/release.yml) | ||
![NPM Version](https://img.shields.io/npm/v/100x-client?style=flat-square&label=NPM&color=%234177f6&link=https://www.npmjs.com/package/100x-client) | ||
![Discord](https://img.shields.io/discord/1203621012659249192?style=flat-square&logo=discord&logoColor=%23fff&label=Discord&color=%234177f6&link=https://discord.gg/100xdex) | ||
@@ -35,8 +35,8 @@ Interact with the [100x decentralized exchange](https://100x.finance/) and trade pre-launch tokens, BTC, ETH, SOL, BLUR and other cryptocurrency perp futures with leverage. Live on [Blast](https://blast.io/en). | ||
| Key | Type | Default | Description | | ||
|--------------|------------------------|--------------------------------|---------------------------------------------------------------------------| | ||
| debug | boolean | false | Used to enable debug mode when running the client for additional logging. | | ||
| environment | 'testnet' \| 'mainnet' | 'testnet' | Specify the environment you wish to trade in. | | ||
| rpc | string | Blast RPC based on environment | Specify a custom RPC url to used. | | ||
| subAccountId | number | 1 | Specify a sub-account ID to use. This can be from 1-255. | | ||
| Key | Type | Default | Description | | ||
|--------------|--------------------------|--------------------------------|---------------------------------------------------------------------------| | ||
| debug | `boolean` | `false` | Used to enable debug mode when running the client for additional logging. | | ||
| environment | `'testnet' \| 'mainnet'` | `'testnet'` | Specify the environment you wish to trade in. | | ||
| rpc | `string` | `Blast RPC based on environment` | Specify a custom RPC url to used. | | ||
| subAccountId | `number` | `1` | Specify a sub-account ID to use. This can be from 1-255. | | ||
@@ -92,10 +92,10 @@ ```ts | ||
| Name | Values | Description | | ||
|--------------|----------------------------------------------------------------------------------------|------------------------------------------------------| | ||
| Environment | MAINNET \| TESTNET | The environment to use when initialising the client. | | ||
| Interval | '1M' \| '5M' \| '15M' \| '30M' \| '1H' \| '2H' \| '4H' \| '8H' \| '1D' \| '3D' \| '1W' | The interval to use when fetching K-line data. | | ||
| MarginAssets | USDB | Symbol values of supported margin assets. | | ||
| OrderStatus | CANCELLED \| EXPIRED \| FILLED \| OPEN \| PENDING \| REJECTED | Defines the possible states an order can be in. | | ||
| OrderType | LIMIT \| LIMIT_MAKER \| MARKET | Order types for building order payloads. | | ||
| TimeInForce | GTC \| FOK \| IOC | Time in force values for building order payloads. | | ||
| Name | Values | Description | | ||
|--------------|------------------------------------------------------------------------------------------|------------------------------------------------------| | ||
| Environment | `MAINNET \| TESTNET` | The environment to use when initialising the client. | | ||
| Interval | `'1M' \| '5M' \| '15M' \| '30M' \| '1H' \| '2H' \| '4H' \| '8H' \| '1D' \| '3D' \| '1W'` | The interval to use when fetching K-line data. | | ||
| MarginAssets | `USDB` | Symbol values of supported margin assets. | | ||
| OrderStatus | `CANCELLED \| EXPIRED \| FILLED \| OPEN \| PENDING \| REJECTED` | Defines the possible states an order can be in. | | ||
| OrderType | `LIMIT \| LIMIT_MAKER \| MARKET` | Order types for building order payloads. | | ||
| TimeInForce | `GTC \| FOK \| IOC` | Time in force values for building order payloads. | | ||
@@ -102,0 +102,0 @@ ### Further support |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
0
74927
2