mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-13 21:52:36 +03:00
Fix: pools instead ORION_POOL
This commit is contained in:
@@ -274,8 +274,8 @@ const swapInfo = await simpleFetch(orionUnit.orionAggregator.getSwapInfo)(
|
||||
"exactSpend", // type
|
||||
"ORN", // asset in
|
||||
"USDT", // asset out
|
||||
25.23453457, // amount
|
||||
["ORION_POOL"] // Exchanges. OPTIONAL! Specify ['ORION_POOL'] if you want "pool only" swap execution
|
||||
25.23453457 // amount
|
||||
// Exchanges. OPTIONAL! Specify 'pools' if you want "pool only" swap execution. Specify 'cex' if you want "cex only" execution
|
||||
);
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orionprotocol/sdk",
|
||||
"version": "0.15.3",
|
||||
"version": "0.15.4",
|
||||
"description": "Orion Protocol SDK",
|
||||
"main": "./lib/esm/index.js",
|
||||
"module": "./lib/esm/index.js",
|
||||
|
||||
@@ -126,7 +126,7 @@ export default async function swapMarket({
|
||||
assetOut,
|
||||
amount.toString(),
|
||||
options?.instantSettlement,
|
||||
options?.poolOnly ? ['ORION_POOL'] : undefined,
|
||||
options?.poolOnly ? 'pools' : undefined,
|
||||
);
|
||||
|
||||
const { exchanges: swapExchanges } = swapInfo;
|
||||
|
||||
14
src/constants/exchanges.ts
Normal file
14
src/constants/exchanges.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export default [
|
||||
// CEXes
|
||||
'ASCENDEX',
|
||||
'OKX',
|
||||
'BINANCE',
|
||||
'KUCOIN',
|
||||
|
||||
// DEXes
|
||||
'SPOOKYSWAP',
|
||||
'PANCAKESWAP',
|
||||
'UNISWAP',
|
||||
'QUICKSWAP',
|
||||
'ORION_POOL',
|
||||
] as const;
|
||||
@@ -1,4 +1,5 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import exchanges from './constants/exchanges';
|
||||
import orderStatuses from './constants/orderStatuses';
|
||||
import subOrderStatuses from './constants/subOrderStatuses';
|
||||
|
||||
@@ -197,6 +198,4 @@ export type BalanceIssue = {
|
||||
readonly fixes?: Fix[],
|
||||
}
|
||||
|
||||
const availableExchanges = ['ORION_POOL', 'ASCENDEX', 'BINANCE', 'KUCOIN'] as const;
|
||||
|
||||
export type Exchange = typeof availableExchanges[number];
|
||||
export type Exchange = typeof exchanges[number];
|
||||
|
||||
Reference in New Issue
Block a user