18 lines
609 B
TypeScript
18 lines
609 B
TypeScript
import {test} from 'node:test'
|
|
import assert from 'node:assert'
|
|
import {cancelGmxOrdersImpl, getClientForAddress} from '../../src/plugins/custom/gmx'
|
|
import {Ticker} from '../../src/generated/ManagingApiTypes'
|
|
|
|
test('GMX Orders Closing', async (t) => {
|
|
await t.test('should close all orders for BTC', async () => {
|
|
const sdk = await getClientForAddress('0x932167388dD9aad41149b3cA23eBD489E2E2DD78')
|
|
|
|
const result = await cancelGmxOrdersImpl(
|
|
sdk,
|
|
Ticker.BTC
|
|
)
|
|
console.log('Orders closing result:', result)
|
|
assert.ok(result, 'Orders closing result should be defined')
|
|
})
|
|
})
|