Skip to content

Commit 5b1d0a1

Browse files
committed
refresh outputs
1 parent bf631a9 commit 5b1d0a1

File tree

1,651 files changed

+227829
-87005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,651 files changed

+227829
-87005
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
import {z_Error, Error} from '@example-outputs/binance-with-zod';
2+
import {z} from 'zod';
3+
import {
4+
RequestUnion,
5+
ResponseBodyData,
6+
ResponseUnion,
7+
RequestResult,
8+
SimpleRequestHandler,
9+
createRequest,
10+
RequestHandlerExecutionConfig,
11+
RequestPayload,
12+
} from '@example-outputs/binance-with-zod/core';
13+
14+
export const getCommissionEndpointSchema = {
15+
path: '/api/v3/account/commission',
16+
method: 'get',
17+
supportedSecuritySchemas: [{name: 'ApiKeyAuth', scopes: []}],
18+
queryParamsZodSchema: z.object({
19+
symbol: z.string(),
20+
timestamp: z.number().int().safe().finite(),
21+
signature: z.string(),
22+
}),
23+
bodyByContentType: {},
24+
responseByStatus: {
25+
'200': {
26+
bodyByContentType: {
27+
'application/json': {
28+
zodSchema: z.object({
29+
symbol: z.string(),
30+
standardCommission: z.object({
31+
maker: z.string(),
32+
taker: z.string(),
33+
buyer: z.string(),
34+
seller: z.string(),
35+
}),
36+
taxCommission: z.object({
37+
maker: z.string(),
38+
taker: z.string(),
39+
buyer: z.string(),
40+
seller: z.string(),
41+
}),
42+
discount: z.object({
43+
enabledForAccount: z.boolean().optional(),
44+
enabledForSymbol: z.boolean().optional(),
45+
discountAsset: z.string().optional(),
46+
discount: z.string().optional(),
47+
}),
48+
}),
49+
},
50+
},
51+
},
52+
'400': {
53+
bodyByContentType: {
54+
'application/json': {
55+
zodSchema: z_Error,
56+
},
57+
},
58+
},
59+
'401': {
60+
bodyByContentType: {
61+
'application/json': {
62+
zodSchema: z_Error,
63+
},
64+
},
65+
},
66+
},
67+
};
68+
69+
export type GetCommissionRequest = RequestUnion<
70+
any,
71+
any,
72+
{
73+
symbol: string;
74+
timestamp: number; // int
75+
signature: string;
76+
}
77+
>;
78+
79+
export type GetCommissionResponse =
80+
| ResponseUnion<
81+
200,
82+
ResponseBodyData<
83+
'application/json',
84+
{
85+
symbol: string;
86+
standardCommission: {
87+
maker: string;
88+
taker: string;
89+
buyer: string;
90+
seller: string;
91+
};
92+
taxCommission: {
93+
maker: string;
94+
taker: string;
95+
buyer: string;
96+
seller: string;
97+
};
98+
discount: {
99+
enabledForAccount?: boolean;
100+
enabledForSymbol?: boolean;
101+
discountAsset?: string;
102+
discount?: string;
103+
};
104+
}
105+
>
106+
>
107+
| ResponseUnion<400, ResponseBodyData<'application/json', Error>>
108+
| ResponseUnion<401, ResponseBodyData<'application/json', Error>>;
109+
110+
export type GetCommissionRequestResult = RequestResult<
111+
GetCommissionRequest,
112+
GetCommissionResponse
113+
>;
114+
115+
export function getCommission(
116+
requestHandler: SimpleRequestHandler,
117+
payload: RequestPayload<GetCommissionRequest, 'queryParams', never>,
118+
config?: RequestHandlerExecutionConfig
119+
): Promise<GetCommissionRequestResult> {
120+
return requestHandler.execute(
121+
createRequest(getCommissionEndpointSchema, payload),
122+
config
123+
);
124+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './getCommission';
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
import {
2+
z_Order,
3+
z_OcoOrder,
4+
z_Error,
5+
Order,
6+
OcoOrder,
7+
Error,
8+
} from '@example-outputs/binance-with-zod';
9+
import {z} from 'zod';
10+
import {
11+
RequestUnion,
12+
ResponseBodyData,
13+
ResponseUnion,
14+
RequestResult,
15+
SimpleRequestHandler,
16+
createRequest,
17+
RequestHandlerExecutionConfig,
18+
RequestPayload,
19+
} from '@example-outputs/binance-with-zod/core';
20+
21+
export const deleteOpenOrdersEndpointSchema = {
22+
path: '/api/v3/openOrders',
23+
method: 'delete',
24+
supportedSecuritySchemas: [{name: 'ApiKeyAuth', scopes: []}],
25+
queryParamsZodSchema: z.object({
26+
symbol: z.string(),
27+
recvWindow: z.number().int().safe().finite().optional(),
28+
timestamp: z.number().int().safe().finite(),
29+
signature: z.string(),
30+
}),
31+
bodyByContentType: {},
32+
responseByStatus: {
33+
'200': {
34+
bodyByContentType: {
35+
'application/json': {
36+
zodSchema: z.array(z.union([z_Order, z_OcoOrder])),
37+
},
38+
},
39+
},
40+
'400': {
41+
bodyByContentType: {
42+
'application/json': {
43+
zodSchema: z_Error,
44+
},
45+
},
46+
},
47+
'401': {
48+
bodyByContentType: {
49+
'application/json': {
50+
zodSchema: z_Error,
51+
},
52+
},
53+
},
54+
},
55+
};
56+
57+
export type DeleteOpenOrdersRequest = RequestUnion<
58+
any,
59+
any,
60+
{
61+
symbol: string;
62+
recvWindow?: number; // int
63+
timestamp: number; // int
64+
signature: string;
65+
}
66+
>;
67+
68+
export type DeleteOpenOrdersResponse =
69+
| ResponseUnion<
70+
200,
71+
ResponseBodyData<
72+
'application/json',
73+
((Order | OcoOrder) & (Partial<Order> & Partial<OcoOrder>))[]
74+
>
75+
>
76+
| ResponseUnion<400, ResponseBodyData<'application/json', Error>>
77+
| ResponseUnion<401, ResponseBodyData<'application/json', Error>>;
78+
79+
export type DeleteOpenOrdersRequestResult = RequestResult<
80+
DeleteOpenOrdersRequest,
81+
DeleteOpenOrdersResponse
82+
>;
83+
84+
export function deleteOpenOrders(
85+
requestHandler: SimpleRequestHandler,
86+
payload: RequestPayload<DeleteOpenOrdersRequest, 'queryParams', never>,
87+
config?: RequestHandlerExecutionConfig
88+
): Promise<DeleteOpenOrdersRequestResult> {
89+
return requestHandler.execute(
90+
createRequest(deleteOpenOrdersEndpointSchema, payload),
91+
config
92+
);
93+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
import {
2+
z_Order,
3+
z_Error,
4+
Order,
5+
Error,
6+
} from '@example-outputs/binance-with-zod';
7+
import {z} from 'zod';
8+
import {
9+
RequestUnion,
10+
ResponseBodyData,
11+
ResponseUnion,
12+
RequestResult,
13+
SimpleRequestHandler,
14+
createRequest,
15+
RequestHandlerExecutionConfig,
16+
RequestPayload,
17+
} from '@example-outputs/binance-with-zod/core';
18+
19+
export const deleteOrderEndpointSchema = {
20+
path: '/api/v3/order',
21+
method: 'delete',
22+
supportedSecuritySchemas: [{name: 'ApiKeyAuth', scopes: []}],
23+
queryParamsZodSchema: z.object({
24+
symbol: z.string(),
25+
orderId: z.number().int().safe().finite().optional(),
26+
origClientOrderId: z.string().optional(),
27+
newClientOrderId: z.string().optional(),
28+
cancelRestrictions: z
29+
.enum(['ONLY_NEW', 'ONLY_PARTIALLY_FILLED'])
30+
.optional(),
31+
recvWindow: z.number().int().safe().finite().optional(),
32+
timestamp: z.number().int().safe().finite(),
33+
signature: z.string(),
34+
}),
35+
bodyByContentType: {},
36+
responseByStatus: {
37+
'200': {
38+
bodyByContentType: {
39+
'application/json': {
40+
zodSchema: z_Order,
41+
},
42+
},
43+
},
44+
'400': {
45+
bodyByContentType: {
46+
'application/json': {
47+
zodSchema: z_Error,
48+
},
49+
},
50+
},
51+
'401': {
52+
bodyByContentType: {
53+
'application/json': {
54+
zodSchema: z_Error,
55+
},
56+
},
57+
},
58+
},
59+
};
60+
61+
export type DeleteOrderRequest = RequestUnion<
62+
any,
63+
any,
64+
{
65+
symbol: string;
66+
orderId?: number; // int
67+
origClientOrderId?: string;
68+
newClientOrderId?: string;
69+
cancelRestrictions?: 'ONLY_NEW' | 'ONLY_PARTIALLY_FILLED';
70+
recvWindow?: number; // int
71+
timestamp: number; // int
72+
signature: string;
73+
}
74+
>;
75+
76+
export type DeleteOrderResponse =
77+
| ResponseUnion<200, ResponseBodyData<'application/json', Order>>
78+
| ResponseUnion<400, ResponseBodyData<'application/json', Error>>
79+
| ResponseUnion<401, ResponseBodyData<'application/json', Error>>;
80+
81+
export type DeleteOrderRequestResult = RequestResult<
82+
DeleteOrderRequest,
83+
DeleteOrderResponse
84+
>;
85+
86+
export function deleteOrder(
87+
requestHandler: SimpleRequestHandler,
88+
payload: RequestPayload<DeleteOrderRequest, 'queryParams', never>,
89+
config?: RequestHandlerExecutionConfig
90+
): Promise<DeleteOrderRequestResult> {
91+
return requestHandler.execute(
92+
createRequest(deleteOrderEndpointSchema, payload),
93+
config
94+
);
95+
}

0 commit comments

Comments
 (0)