Fix close position

This commit is contained in:
2025-05-12 13:07:43 +07:00
parent 0cf523c144
commit 4b0e87d48e
7 changed files with 20 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
import { test } from 'node:test'
import {test} from 'node:test'
import assert from 'node:assert'
import { getClientForAddress, closeGmxPositionImpl } from '../../src/plugins/custom/gmx'
import { TradeDirection } from '../../src/generated/ManagingApiTypes'
import {closeGmxPositionImpl, getClientForAddress} from '../../src/plugins/custom/gmx'
import {TradeDirection} from '../../src/generated/ManagingApiTypes'
test('GMX Position Closing', async (t) => {
await t.test('should close a long position for BTC', async () => {
@@ -9,7 +9,7 @@ test('GMX Position Closing', async (t) => {
const result = await closeGmxPositionImpl(
sdk,
'BTC',
'BNB',
TradeDirection.Long
)
console.log('Position closing result:', result)