@compass-labs/api-sdk 2.2.59 → 2.2.60-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codeSamples_typescript.yaml +21 -21
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/docs/models/components/approvetransferrequest.md +2 -2
- package/docs/models/components/createaccountrequest.md +4 -4
- package/docs/models/components/depositforburnrequest.md +2 -2
- package/docs/models/components/earnmanagerequest.md +2 -2
- package/docs/models/components/earnswaprequest.md +2 -2
- package/docs/models/components/earntransferrequest.md +2 -2
- package/docs/models/components/globalmarketsperpsapprovebuilderfeerequest.md +2 -2
- package/docs/models/components/globalmarketsperpscancelorderrequest.md +2 -2
- package/docs/models/components/globalmarketsperpsdepositrequest.md +2 -2
- package/docs/models/components/globalmarketsperpsdepositsponsorpreparerequest.md +2 -2
- package/docs/models/components/globalmarketsperpslimitorderrequest.md +2 -2
- package/docs/models/components/globalmarketsperpsmarketorderrequest.md +2 -2
- package/docs/models/components/globalmarketsperpswithdrawrequest.md +2 -2
- package/docs/models/components/v2bundlerequest.md +2 -2
- package/docs/models/operations/v2creditbalancesrequest.md +2 -2
- package/docs/models/operations/v2creditpositionsrequest.md +2 -2
- package/docs/models/operations/v2earnbalancesrequest.md +2 -2
- package/docs/models/operations/v2earnpositionsallrequest.md +2 -2
- package/docs/models/operations/v2earnpositionsrequest.md +2 -2
- package/docs/models/operations/v2globalmarketsperpsactivityrequest.md +2 -2
- package/docs/models/operations/v2globalmarketsperpspositionsrequest.md +2 -2
- package/docs/sdks/bridge/README.md +2 -2
- package/docs/sdks/credit/README.md +4 -4
- package/docs/sdks/earn/README.md +18 -18
- package/docs/sdks/gassponsorship/README.md +2 -2
- package/docs/sdks/globalmarketsperps/README.md +18 -18
- package/examples/node_modules/tsx/dist/cli.cjs +1 -1
- package/examples/node_modules/tsx/dist/cli.mjs +1 -1
- package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/esm/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/esm/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/loader.cjs +1 -1
- package/examples/node_modules/tsx/dist/loader.mjs +1 -1
- package/examples/node_modules/tsx/dist/package-Bj47PlGH.mjs +1 -0
- package/examples/node_modules/tsx/dist/package-DMqO70yR.cjs +1 -0
- package/examples/node_modules/tsx/dist/register-CKju0f8h.cjs +2 -0
- package/examples/node_modules/tsx/dist/register-CqMfTiWi.mjs +2 -0
- package/examples/node_modules/tsx/dist/repl.cjs +1 -1
- package/examples/node_modules/tsx/dist/repl.mjs +1 -1
- package/examples/node_modules/tsx/package.json +1 -1
- package/examples/package-lock.json +3 -3
- package/openapi_prepped_for_speakeasy.json +37 -37
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/examples/node_modules/tsx/dist/package-CGdS2_oX.cjs +0 -1
- package/examples/node_modules/tsx/dist/package-DyJMwVU5.mjs +0 -1
- package/examples/node_modules/tsx/dist/register-CHVGxKtC.cjs +0 -2
- package/examples/node_modules/tsx/dist/register-D_B8UL5H.mjs +0 -2
|
@@ -8,7 +8,7 @@ Request to place a market order on a global markets perps market.
|
|
|
8
8
|
import { GlobalMarketsPerpsMarketOrderRequest } from "@compass-labs/api-sdk/models/components";
|
|
9
9
|
|
|
10
10
|
let value: GlobalMarketsPerpsMarketOrderRequest = {
|
|
11
|
-
owner: "
|
|
11
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
12
12
|
asset: "AAPL",
|
|
13
13
|
side: "buy",
|
|
14
14
|
size: "10.0",
|
|
@@ -21,7 +21,7 @@ let value: GlobalMarketsPerpsMarketOrderRequest = {
|
|
|
21
21
|
|
|
22
22
|
| Field | Type | Required | Description | Example |
|
|
23
23
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
-
| `owner` | *string* | :heavy_check_mark: | Owner of the global markets perps product account |
|
|
24
|
+
| `owner` | *string* | :heavy_check_mark: | Owner of the global markets perps product account | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
25
25
|
| `asset` | *string* | :heavy_check_mark: | Asset ticker symbol (e.g. AAPL, GOLD, EUR) | AAPL |
|
|
26
26
|
| `side` | *string* | :heavy_check_mark: | Order side: 'buy' or 'sell' | buy |
|
|
27
27
|
| `size` | *string* | :heavy_check_mark: | Number of contracts (human-readable) | 10.0 |
|
|
@@ -8,7 +8,7 @@ Request to withdraw USDC from HyperEVM global markets perps account to Arbitrum.
|
|
|
8
8
|
import { GlobalMarketsPerpsWithdrawRequest } from "@compass-labs/api-sdk/models/components";
|
|
9
9
|
|
|
10
10
|
let value: GlobalMarketsPerpsWithdrawRequest = {
|
|
11
|
-
owner: "
|
|
11
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
12
12
|
amount: "100.0",
|
|
13
13
|
};
|
|
14
14
|
```
|
|
@@ -17,6 +17,6 @@ let value: GlobalMarketsPerpsWithdrawRequest = {
|
|
|
17
17
|
|
|
18
18
|
| Field | Type | Required | Description | Example |
|
|
19
19
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
|
|
20
|
-
| `owner` | *string* | :heavy_check_mark: | The user's EOA address (owner of the global markets perps account) |
|
|
20
|
+
| `owner` | *string* | :heavy_check_mark: | The user's EOA address (owner of the global markets perps account) | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
21
21
|
| `amount` | *string* | :heavy_check_mark: | USDC amount to withdraw (human-readable, e.g. '500.0') | 100.0 |
|
|
22
22
|
| `destination` | *string* | :heavy_minus_sign: | Arbitrum destination address (defaults to owner if not specified) | |
|
|
@@ -46,7 +46,7 @@ Specify the exact token amount to transfer.
|
|
|
46
46
|
import { V2BundleRequest } from "@compass-labs/api-sdk/models/components";
|
|
47
47
|
|
|
48
48
|
let value: V2BundleRequest = {
|
|
49
|
-
owner: "
|
|
49
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
50
50
|
chain: "ethereum",
|
|
51
51
|
actions: [
|
|
52
52
|
{
|
|
@@ -88,7 +88,7 @@ let value: V2BundleRequest = {
|
|
|
88
88
|
|
|
89
89
|
| Field | Type | Required | Description | Example |
|
|
90
90
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
|
-
| `owner` | *string* | :heavy_check_mark: | The owner's wallet address that controls the Earn Account. |
|
|
91
|
+
| `owner` | *string* | :heavy_check_mark: | The owner's wallet address that controls the Earn Account. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
92
92
|
| `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
|
|
93
93
|
| `actions` | [components.V2UserOperation](../../models/components/v2useroperation.md)[] | :heavy_check_mark: | List of actions to bundle. Actions are executed in order. | [<br/>{<br/>"body": {<br/>"action_type": "V2_TRANSFER_FROM_EOA",<br/>"amount": "100",<br/>"permit2_deadline": 1706001800,<br/>"permit2_nonce": 1706000000,<br/>"permit2_signature": "0x...",<br/>"token": "USDC"<br/>}<br/>},<br/>{<br/>"body": {<br/>"action_type": "V2_SWAP",<br/>"amount_in": "100",<br/>"slippage": "0.5",<br/>"token_in": "USDC",<br/>"token_out": "AUSD"<br/>}<br/>},<br/>{<br/>"body": {<br/>"action": "DEPOSIT",<br/>"action_type": "V2_MANAGE",<br/>"amount": "100",<br/>"venue": {<br/>"type": "VAULT",<br/>"vault_address": "0x1B4cd53a1A8e5F50aB6320EF34E5fB4D3df7B6f6"<br/>}<br/>}<br/>}<br/>] |
|
|
94
94
|
| `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas sponsorship. The owner must sign this data and submit to /gas_sponsorship/prepare. | false |
|
|
@@ -7,7 +7,7 @@ import { V2CreditBalancesRequest } from "@compass-labs/api-sdk/models/operations
|
|
|
7
7
|
|
|
8
8
|
let value: V2CreditBalancesRequest = {
|
|
9
9
|
chain: "base",
|
|
10
|
-
owner: "
|
|
10
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
11
11
|
};
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -16,4 +16,4 @@ let value: V2CreditBalancesRequest = {
|
|
|
16
16
|
| Field | Type | Required | Description | Example |
|
|
17
17
|
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
|
18
18
|
| `chain` | [operations.V2CreditBalancesChain](../../models/operations/v2creditbalanceschain.md) | :heavy_check_mark: | N/A | base |
|
|
19
|
-
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the credit account. |
|
|
19
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the credit account. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
@@ -7,7 +7,7 @@ import { V2CreditPositionsRequest } from "@compass-labs/api-sdk/models/operation
|
|
|
7
7
|
|
|
8
8
|
let value: V2CreditPositionsRequest = {
|
|
9
9
|
chain: "base",
|
|
10
|
-
owner: "
|
|
10
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
11
11
|
};
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -16,4 +16,4 @@ let value: V2CreditPositionsRequest = {
|
|
|
16
16
|
| Field | Type | Required | Description | Example |
|
|
17
17
|
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
18
18
|
| `chain` | [operations.V2CreditPositionsChain](../../models/operations/v2creditpositionschain.md) | :heavy_check_mark: | N/A | base |
|
|
19
|
-
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the credit account to get positions for. |
|
|
19
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the credit account to get positions for. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
@@ -7,7 +7,7 @@ import { V2EarnBalancesRequest } from "@compass-labs/api-sdk/models/operations";
|
|
|
7
7
|
|
|
8
8
|
let value: V2EarnBalancesRequest = {
|
|
9
9
|
chain: "base",
|
|
10
|
-
owner: "
|
|
10
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
11
11
|
};
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -16,4 +16,4 @@ let value: V2EarnBalancesRequest = {
|
|
|
16
16
|
| Field | Type | Required | Description | Example |
|
|
17
17
|
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
18
18
|
| `chain` | [operations.V2EarnBalancesChain](../../models/operations/v2earnbalanceschain.md) | :heavy_check_mark: | N/A | base |
|
|
19
|
-
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account. |
|
|
19
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { V2EarnPositionsAllRequest } from "@compass-labs/api-sdk/models/operations";
|
|
7
7
|
|
|
8
8
|
let value: V2EarnPositionsAllRequest = {
|
|
9
|
-
owner: "
|
|
9
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
10
10
|
};
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -14,4 +14,4 @@ let value: V2EarnPositionsAllRequest = {
|
|
|
14
14
|
|
|
15
15
|
| Field | Type | Required | Description | Example |
|
|
16
16
|
| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- |
|
|
17
|
-
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account. |
|
|
17
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
@@ -7,7 +7,7 @@ import { V2EarnPositionsRequest } from "@compass-labs/api-sdk/models/operations"
|
|
|
7
7
|
|
|
8
8
|
let value: V2EarnPositionsRequest = {
|
|
9
9
|
chain: "base",
|
|
10
|
-
owner: "
|
|
10
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
11
11
|
};
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -16,4 +16,4 @@ let value: V2EarnPositionsRequest = {
|
|
|
16
16
|
| Field | Type | Required | Description | Example |
|
|
17
17
|
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
18
18
|
| `chain` | [operations.V2EarnPositionsChain](../../models/operations/v2earnpositionschain.md) | :heavy_check_mark: | N/A | base |
|
|
19
|
-
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account to get positions for. |
|
|
19
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account to get positions for. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { V2GlobalMarketsPerpsActivityRequest } from "@compass-labs/api-sdk/models/operations";
|
|
7
7
|
|
|
8
8
|
let value: V2GlobalMarketsPerpsActivityRequest = {
|
|
9
|
-
owner: "
|
|
9
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
10
10
|
};
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -14,5 +14,5 @@ let value: V2GlobalMarketsPerpsActivityRequest = {
|
|
|
14
14
|
|
|
15
15
|
| Field | Type | Required | Description | Example |
|
|
16
16
|
| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
-
| `owner` | *string* | :heavy_check_mark: | End-user EOA whose activity should be fetched. |
|
|
17
|
+
| `owner` | *string* | :heavy_check_mark: | End-user EOA whose activity should be fetched. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
18
18
|
| `builder` | *string* | :heavy_minus_sign: | Optional builder address. When provided, the response includes the current builder-fee approval state for this (owner, builder) pair. | |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { V2GlobalMarketsPerpsPositionsRequest } from "@compass-labs/api-sdk/models/operations";
|
|
7
7
|
|
|
8
8
|
let value: V2GlobalMarketsPerpsPositionsRequest = {
|
|
9
|
-
owner: "
|
|
9
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
10
10
|
};
|
|
11
11
|
```
|
|
12
12
|
|
|
@@ -14,5 +14,5 @@ let value: V2GlobalMarketsPerpsPositionsRequest = {
|
|
|
14
14
|
|
|
15
15
|
| Field | Type | Required | Description | Example |
|
|
16
16
|
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
|
|
17
|
-
| `owner` | *string* | :heavy_check_mark: | User's EOA address (looks up their global markets perps product account) |
|
|
17
|
+
| `owner` | *string* | :heavy_check_mark: | User's EOA address (looks up their global markets perps product account) | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
18
18
|
| `asset` | *string* | :heavy_minus_sign: | Filter to a specific asset ticker (e.g. AAPL) | |
|
|
@@ -45,7 +45,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
45
45
|
|
|
46
46
|
async function run() {
|
|
47
47
|
const result = await compassApiSDK.bridge.cctpBurn({
|
|
48
|
-
owner: "
|
|
48
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
49
49
|
chain: "arbitrum",
|
|
50
50
|
amount: "3",
|
|
51
51
|
destinationChain: "base",
|
|
@@ -75,7 +75,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
75
75
|
|
|
76
76
|
async function run() {
|
|
77
77
|
const res = await bridgeCctpBurn(compassApiSDK, {
|
|
78
|
-
owner: "
|
|
78
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
79
79
|
chain: "arbitrum",
|
|
80
80
|
amount: "3",
|
|
81
81
|
destinationChain: "base",
|
|
@@ -32,7 +32,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
32
32
|
async function run() {
|
|
33
33
|
const result = await compassApiSDK.credit.creditPositions({
|
|
34
34
|
chain: "base",
|
|
35
|
-
owner: "
|
|
35
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
console.log(result);
|
|
@@ -58,7 +58,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
58
58
|
async function run() {
|
|
59
59
|
const res = await creditCreditPositions(compassApiSDK, {
|
|
60
60
|
chain: "base",
|
|
61
|
-
owner: "
|
|
61
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
62
62
|
});
|
|
63
63
|
if (res.ok) {
|
|
64
64
|
const { value: result } = res;
|
|
@@ -111,7 +111,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
111
111
|
async function run() {
|
|
112
112
|
const result = await compassApiSDK.credit.creditBalances({
|
|
113
113
|
chain: "base",
|
|
114
|
-
owner: "
|
|
114
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
console.log(result);
|
|
@@ -137,7 +137,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
137
137
|
async function run() {
|
|
138
138
|
const res = await creditCreditBalances(compassApiSDK, {
|
|
139
139
|
chain: "base",
|
|
140
|
-
owner: "
|
|
140
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
141
141
|
});
|
|
142
142
|
if (res.ok) {
|
|
143
143
|
const { value: result } = res;
|
package/docs/sdks/earn/README.md
CHANGED
|
@@ -40,7 +40,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
40
40
|
async function run() {
|
|
41
41
|
const result = await compassApiSDK.earn.earnPositions({
|
|
42
42
|
chain: "base",
|
|
43
|
-
owner: "
|
|
43
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
console.log(result);
|
|
@@ -66,7 +66,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
66
66
|
async function run() {
|
|
67
67
|
const res = await earnEarnPositions(compassApiSDK, {
|
|
68
68
|
chain: "base",
|
|
69
|
-
owner: "
|
|
69
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
70
70
|
});
|
|
71
71
|
if (res.ok) {
|
|
72
72
|
const { value: result } = res;
|
|
@@ -122,7 +122,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
122
122
|
|
|
123
123
|
async function run() {
|
|
124
124
|
const result = await compassApiSDK.earn.earnPositionsAll({
|
|
125
|
-
owner: "
|
|
125
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
console.log(result);
|
|
@@ -147,7 +147,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
147
147
|
|
|
148
148
|
async function run() {
|
|
149
149
|
const res = await earnEarnPositionsAll(compassApiSDK, {
|
|
150
|
-
owner: "
|
|
150
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
151
151
|
});
|
|
152
152
|
if (res.ok) {
|
|
153
153
|
const { value: result } = res;
|
|
@@ -459,7 +459,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
459
459
|
async function run() {
|
|
460
460
|
const result = await compassApiSDK.earn.earnBalances({
|
|
461
461
|
chain: "base",
|
|
462
|
-
owner: "
|
|
462
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
463
463
|
});
|
|
464
464
|
|
|
465
465
|
console.log(result);
|
|
@@ -485,7 +485,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
485
485
|
async function run() {
|
|
486
486
|
const res = await earnEarnBalances(compassApiSDK, {
|
|
487
487
|
chain: "base",
|
|
488
|
-
owner: "
|
|
488
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
489
489
|
});
|
|
490
490
|
if (res.ok) {
|
|
491
491
|
const { value: result } = res;
|
|
@@ -543,8 +543,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
543
543
|
async function run() {
|
|
544
544
|
const result = await compassApiSDK.earn.earnCreateAccount({
|
|
545
545
|
chain: "base",
|
|
546
|
-
sender: "
|
|
547
|
-
owner: "
|
|
546
|
+
sender: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
547
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
548
548
|
});
|
|
549
549
|
|
|
550
550
|
console.log(result);
|
|
@@ -570,8 +570,8 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
570
570
|
async function run() {
|
|
571
571
|
const res = await earnEarnCreateAccount(compassApiSDK, {
|
|
572
572
|
chain: "base",
|
|
573
|
-
sender: "
|
|
574
|
-
owner: "
|
|
573
|
+
sender: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
574
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
575
575
|
});
|
|
576
576
|
if (res.ok) {
|
|
577
577
|
const { value: result } = res;
|
|
@@ -636,7 +636,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
636
636
|
|
|
637
637
|
async function run() {
|
|
638
638
|
const result = await compassApiSDK.earn.earnTransfer({
|
|
639
|
-
owner: "
|
|
639
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
640
640
|
chain: "base",
|
|
641
641
|
token: "USDC",
|
|
642
642
|
amount: "0.01",
|
|
@@ -665,7 +665,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
665
665
|
|
|
666
666
|
async function run() {
|
|
667
667
|
const res = await earnEarnTransfer(compassApiSDK, {
|
|
668
|
-
owner: "
|
|
668
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
669
669
|
chain: "base",
|
|
670
670
|
token: "USDC",
|
|
671
671
|
amount: "0.01",
|
|
@@ -738,7 +738,7 @@ async function run() {
|
|
|
738
738
|
},
|
|
739
739
|
action: "DEPOSIT",
|
|
740
740
|
amount: "0.01",
|
|
741
|
-
owner: "
|
|
741
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
742
742
|
chain: "base",
|
|
743
743
|
gasSponsorship: false,
|
|
744
744
|
});
|
|
@@ -771,7 +771,7 @@ async function run() {
|
|
|
771
771
|
},
|
|
772
772
|
action: "DEPOSIT",
|
|
773
773
|
amount: "0.01",
|
|
774
|
-
owner: "
|
|
774
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
775
775
|
chain: "base",
|
|
776
776
|
gasSponsorship: false,
|
|
777
777
|
});
|
|
@@ -832,7 +832,7 @@ async function run() {
|
|
|
832
832
|
tokenOut: "USDT",
|
|
833
833
|
amountIn: "0.01",
|
|
834
834
|
slippage: "0.5",
|
|
835
|
-
owner: "
|
|
835
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
836
836
|
chain: "base",
|
|
837
837
|
gasSponsorship: false,
|
|
838
838
|
});
|
|
@@ -863,7 +863,7 @@ async function run() {
|
|
|
863
863
|
tokenOut: "USDT",
|
|
864
864
|
amountIn: "0.01",
|
|
865
865
|
slippage: "0.5",
|
|
866
|
-
owner: "
|
|
866
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
867
867
|
chain: "base",
|
|
868
868
|
gasSponsorship: false,
|
|
869
869
|
});
|
|
@@ -922,7 +922,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
922
922
|
|
|
923
923
|
async function run() {
|
|
924
924
|
const result = await compassApiSDK.earn.earnBundle({
|
|
925
|
-
owner: "
|
|
925
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
926
926
|
chain: "ethereum",
|
|
927
927
|
actions: [
|
|
928
928
|
{
|
|
@@ -981,7 +981,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
981
981
|
|
|
982
982
|
async function run() {
|
|
983
983
|
const res = await earnEarnBundle(compassApiSDK, {
|
|
984
|
-
owner: "
|
|
984
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
985
985
|
chain: "ethereum",
|
|
986
986
|
actions: [
|
|
987
987
|
{
|
|
@@ -238,7 +238,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
238
238
|
|
|
239
239
|
async function run() {
|
|
240
240
|
const result = await compassApiSDK.gasSponsorship.gasSponsorshipApproveTransfer({
|
|
241
|
-
owner: "
|
|
241
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
242
242
|
chain: "base",
|
|
243
243
|
token: "USDT",
|
|
244
244
|
});
|
|
@@ -265,7 +265,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
265
265
|
|
|
266
266
|
async function run() {
|
|
267
267
|
const res = await gasSponsorshipGasSponsorshipApproveTransfer(compassApiSDK, {
|
|
268
|
-
owner: "
|
|
268
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
269
269
|
chain: "base",
|
|
270
270
|
token: "USDT",
|
|
271
271
|
});
|
|
@@ -121,7 +121,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
121
121
|
|
|
122
122
|
async function run() {
|
|
123
123
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsPositions({
|
|
124
|
-
owner: "
|
|
124
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
console.log(result);
|
|
@@ -146,7 +146,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
146
146
|
|
|
147
147
|
async function run() {
|
|
148
148
|
const res = await globalMarketsPerpsGlobalMarketsPerpsPositions(compassApiSDK, {
|
|
149
|
-
owner: "
|
|
149
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
150
150
|
});
|
|
151
151
|
if (res.ok) {
|
|
152
152
|
const { value: result } = res;
|
|
@@ -288,7 +288,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
288
288
|
|
|
289
289
|
async function run() {
|
|
290
290
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsActivity({
|
|
291
|
-
owner: "
|
|
291
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
292
292
|
});
|
|
293
293
|
|
|
294
294
|
console.log(result);
|
|
@@ -313,7 +313,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
313
313
|
|
|
314
314
|
async function run() {
|
|
315
315
|
const res = await globalMarketsPerpsGlobalMarketsPerpsActivity(compassApiSDK, {
|
|
316
|
-
owner: "
|
|
316
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
317
317
|
});
|
|
318
318
|
if (res.ok) {
|
|
319
319
|
const { value: result } = res;
|
|
@@ -368,7 +368,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
368
368
|
|
|
369
369
|
async function run() {
|
|
370
370
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsDeposit({
|
|
371
|
-
owner: "
|
|
371
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
372
372
|
amount: "100.0",
|
|
373
373
|
});
|
|
374
374
|
|
|
@@ -394,7 +394,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
394
394
|
|
|
395
395
|
async function run() {
|
|
396
396
|
const res = await globalMarketsPerpsGlobalMarketsPerpsDeposit(compassApiSDK, {
|
|
397
|
-
owner: "
|
|
397
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
398
398
|
amount: "100.0",
|
|
399
399
|
});
|
|
400
400
|
if (res.ok) {
|
|
@@ -449,7 +449,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
449
449
|
|
|
450
450
|
async function run() {
|
|
451
451
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsDepositSponsorPrepare({
|
|
452
|
-
owner: "
|
|
452
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
453
453
|
amountRaw: 100000000,
|
|
454
454
|
deadline: 1747097383,
|
|
455
455
|
signature: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
@@ -478,7 +478,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
478
478
|
|
|
479
479
|
async function run() {
|
|
480
480
|
const res = await globalMarketsPerpsGlobalMarketsPerpsDepositSponsorPrepare(compassApiSDK, {
|
|
481
|
-
owner: "
|
|
481
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
482
482
|
amountRaw: 100000000,
|
|
483
483
|
deadline: 1747097383,
|
|
484
484
|
signature: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
@@ -535,7 +535,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
535
535
|
|
|
536
536
|
async function run() {
|
|
537
537
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsWithdraw({
|
|
538
|
-
owner: "
|
|
538
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
539
539
|
amount: "100.0",
|
|
540
540
|
});
|
|
541
541
|
|
|
@@ -561,7 +561,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
561
561
|
|
|
562
562
|
async function run() {
|
|
563
563
|
const res = await globalMarketsPerpsGlobalMarketsPerpsWithdraw(compassApiSDK, {
|
|
564
|
-
owner: "
|
|
564
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
565
565
|
amount: "100.0",
|
|
566
566
|
});
|
|
567
567
|
if (res.ok) {
|
|
@@ -615,7 +615,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
615
615
|
|
|
616
616
|
async function run() {
|
|
617
617
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsMarketOrder({
|
|
618
|
-
owner: "
|
|
618
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
619
619
|
asset: "AAPL",
|
|
620
620
|
side: "buy",
|
|
621
621
|
size: "10.0",
|
|
@@ -645,7 +645,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
645
645
|
|
|
646
646
|
async function run() {
|
|
647
647
|
const res = await globalMarketsPerpsGlobalMarketsPerpsMarketOrder(compassApiSDK, {
|
|
648
|
-
owner: "
|
|
648
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
649
649
|
asset: "AAPL",
|
|
650
650
|
side: "buy",
|
|
651
651
|
size: "10.0",
|
|
@@ -702,7 +702,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
702
702
|
|
|
703
703
|
async function run() {
|
|
704
704
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsLimitOrder({
|
|
705
|
-
owner: "
|
|
705
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
706
706
|
asset: "AAPL",
|
|
707
707
|
side: "buy",
|
|
708
708
|
size: "10.0",
|
|
@@ -733,7 +733,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
733
733
|
|
|
734
734
|
async function run() {
|
|
735
735
|
const res = await globalMarketsPerpsGlobalMarketsPerpsLimitOrder(compassApiSDK, {
|
|
736
|
-
owner: "
|
|
736
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
737
737
|
asset: "AAPL",
|
|
738
738
|
side: "buy",
|
|
739
739
|
size: "10.0",
|
|
@@ -791,7 +791,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
791
791
|
|
|
792
792
|
async function run() {
|
|
793
793
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsCancelOrder({
|
|
794
|
-
owner: "
|
|
794
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
795
795
|
asset: "AAPL",
|
|
796
796
|
orderId: 12345,
|
|
797
797
|
});
|
|
@@ -818,7 +818,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
818
818
|
|
|
819
819
|
async function run() {
|
|
820
820
|
const res = await globalMarketsPerpsGlobalMarketsPerpsCancelOrder(compassApiSDK, {
|
|
821
|
-
owner: "
|
|
821
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
822
822
|
asset: "AAPL",
|
|
823
823
|
orderId: 12345,
|
|
824
824
|
});
|
|
@@ -964,7 +964,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
964
964
|
|
|
965
965
|
async function run() {
|
|
966
966
|
const result = await compassApiSDK.globalMarketsPerps.globalMarketsPerpsApproveBuilderFee({
|
|
967
|
-
owner: "
|
|
967
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
968
968
|
builder: {
|
|
969
969
|
address: "0x88806A71D74AD0a510B350545C9AE490912F0888",
|
|
970
970
|
maxFeeRate: "0.01%",
|
|
@@ -993,7 +993,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
993
993
|
|
|
994
994
|
async function run() {
|
|
995
995
|
const res = await globalMarketsPerpsGlobalMarketsPerpsApproveBuilderFee(compassApiSDK, {
|
|
996
|
-
owner: "
|
|
996
|
+
owner: "0x06A9aF046187895AcFc7258450B15397CAc67400",
|
|
997
997
|
builder: {
|
|
998
998
|
address: "0x88806A71D74AD0a510B350545C9AE490912F0888",
|
|
999
999
|
maxFeeRate: "0.01%",
|