0.1.5 • Published 8 months ago
@premarket/sdk v0.1.5
@premarket/sdk
SDK cho các ứng dụng React/Next.js sử dụng WhalesMarket.
Cài đặt
pnpm add @premarket/sdkSử dụng
import { WhalesMarketProvider, useWhalesMarket } from '@premarket/sdk';
function App() {
return (
<WhalesMarketProvider apiKey="your_api_key">
<YourApp />
</WhalesMarketProvider>
);
}
function YourApp() {
const { data, loading } = useWhalesMarket();
if (loading) return <div>Loading...</div>;
return (
<div>
{/* Sử dụng data từ WhalesMarket */}
</div>
);
}