forked from piotrostr/pump-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
trade.ts
45 lines (43 loc) · 1.3 KB
/
trade.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { z } from "zod";
// Define the schema for the trade data
export const TradeCreatedSchema = z.object({
signature: z.string(),
sol_amount: z.number(),
token_amount: z.number(),
is_buy: z.boolean(),
user: z.string(),
timestamp: z.number(),
mint: z.string(),
virtual_sol_reserves: z.number(),
virtual_token_reserves: z.number(),
slot: z.number(),
tx_index: z.number(),
name: z.string(),
symbol: z.string(),
description: z.string(),
image_uri: z.string(),
metadata_uri: z.string(),
twitter: z.string().nullable(),
telegram: z.string().nullable(),
bonding_curve: z.string(),
associated_bonding_curve: z.string(),
creator: z.string(),
created_timestamp: z.number(),
raydium_pool: z.unknown().nullable(),
complete: z.boolean(),
total_supply: z.number(),
website: z.string().nullable(),
show_name: z.boolean(),
king_of_the_hill_timestamp: z.number().nullable(),
market_cap: z.number(),
reply_count: z.number(),
last_reply: z.number().nullable(),
nsfw: z.boolean(),
market_id: z.string().nullable(),
inverted: z.unknown().nullable(),
is_currently_live: z.boolean(),
creator_username: z.string().nullable(),
creator_profile_image: z.string().nullable(),
usd_market_cap: z.number().optional(),
});
export type Trade = z.infer<typeof TradeCreatedSchema>;