Update fetch borkerPosition in bot + better HandleClosePosition + Add debug channel to receive all debug

This commit is contained in:
2025-10-25 18:35:51 +07:00
parent 38e6998ff3
commit f816b8de50
9 changed files with 229 additions and 98 deletions

View File

@@ -4,7 +4,7 @@ import {getClientForAddress, getPositionHistoryImpl} from '../../src/plugins/cus
test('GMX get position history - Closed positions with actual PnL', async (t) => {
await t.test('should get closed positions with actual GMX PnL data', async () => {
const sdk = await getClientForAddress('0x987b67313ee4827FE55e1FBcd8883D3bb0Bde83b')
const sdk = await getClientForAddress('0x8767F195D1a3103789230aaaE9c0E0825a9802c6')
const result = await getPositionHistoryImpl(
sdk,
@@ -50,7 +50,7 @@ test('GMX get position history - Closed positions with actual PnL', async (t) =>
})
await t.test('should get closed positions with date range', async () => {
const sdk = await getClientForAddress('0x987b67313ee4827FE55e1FBcd8883D3bb0Bde83b')
const sdk = await getClientForAddress('0x8767F195D1a3103789230aaaE9c0E0825a9802c6')
// Get positions from the last 1 hour
const toDate = new Date()
@@ -89,7 +89,7 @@ test('GMX get position history - Closed positions with actual PnL', async (t) =>
})
await t.test('should verify PnL data is suitable for reconciliation', async () => {
const sdk = await getClientForAddress('0x987b67313ee4827FE55e1FBcd8883D3bb0Bde83b')
const sdk = await getClientForAddress('0x8767F195D1a3103789230aaaE9c0E0825a9802c6')
const result = await getPositionHistoryImpl(sdk, 0, 5)