diff --git a/src/routes/api/bybit/test/+server.ts b/src/routes/api/bybit/test/+server.ts new file mode 100644 index 0000000..9d9952b --- /dev/null +++ b/src/routes/api/bybit/test/+server.ts @@ -0,0 +1,17 @@ +import { json } from '@sveltejs/kit' +import { RestClientV5 } from 'bybit-api' + +export const POST = async () => { + const client = new RestClientV5({ + key: 'wrc1w54Zp5JAfXLxY2', + secret: 'tY7oYPhwSE1gabFS4PmxtmbDOhkYWvPh0khf', + demoTrading: true, + }) + + const orders = await client.getActiveOrders({ + category: 'linear', + }) + return json({ + orders, + }) +} diff --git a/src/routes/dashboard/crypto-data/+page.svelte b/src/routes/dashboard/crypto-data/+page.svelte index 099bf9f..1ac3c9a 100644 --- a/src/routes/dashboard/crypto-data/+page.svelte +++ b/src/routes/dashboard/crypto-data/+page.svelte @@ -20,7 +20,7 @@ today, } from '@internationalized/date' import { cn } from '$lib/utils.js' - import { buttonVariants } from '$lib/components/ui/button' + import { Button, buttonVariants } from '$lib/components/ui/button' import Bingx from './(components)/bingx.svelte' import { ScrollArea } from '$lib/components/ui/scroll-area' @@ -105,6 +105,12 @@ +