Add TP1/SL consistency check on trade restore

This commit is contained in:
mindesbunister
2025-11-06 12:18:31 +01:00
parent 7c888282ec
commit 6c7eaf5f04
7 changed files with 265 additions and 26 deletions

15
scripts/show-position.ts Normal file
View File

@@ -0,0 +1,15 @@
import { initializeDriftService, getDriftService } from '../lib/drift/client'
import { getMarketConfig } from '../config/trading'
async function main() {
await initializeDriftService()
const service = getDriftService()
const market = getMarketConfig('SOL-PERP')
const position = await service.getPosition(market.driftMarketIndex)
console.log('Position:', position)
}
main().catch(err => {
console.error(err)
process.exit(1)
})