You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
398 B
TypeScript
20 lines
398 B
TypeScript
import { json } from '@sveltejs/kit'
|
|
import { RestClientV5 } from 'bybit-api'
|
|
|
|
export const POST = async () => {
|
|
const client = new RestClientV5({
|
|
key: 'PqFoCewaiEo8MtoFEx',
|
|
secret: 'WbWr8Y2HG8Phng4pjR8v3wVCsYRW4A2lzWiT',
|
|
demoTrading: true,
|
|
})
|
|
|
|
const orders = await client.getActiveOrders({
|
|
category: 'linear',
|
|
baseCoin: 'USDT',
|
|
})
|
|
console.log(orders)
|
|
return json({
|
|
orders,
|
|
})
|
|
}
|