@gbozee/ultimate 0.0.2-154 → 0.0.2-155
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/dist/index.cjs +34 -30
- package/dist/index.js +34 -30
- package/dist/mcp-server.cjs +34 -30
- package/dist/mcp-server.js +34 -30
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -60180,14 +60180,20 @@ class ExchangeAccount {
|
|
|
60180
60180
|
symbol,
|
|
60181
60181
|
kind
|
|
60182
60182
|
});
|
|
60183
|
-
await this.
|
|
60183
|
+
const focusPosition = await this.getFocusPosition({
|
|
60184
60184
|
symbol,
|
|
60185
|
-
kind
|
|
60186
|
-
limit: false,
|
|
60187
|
-
ignore_config: true,
|
|
60188
|
-
tp: true
|
|
60185
|
+
kind
|
|
60189
60186
|
});
|
|
60190
|
-
if (
|
|
60187
|
+
if (focusPosition.getInstance().quantity > 0) {
|
|
60188
|
+
await this.placeTrade({
|
|
60189
|
+
symbol,
|
|
60190
|
+
kind,
|
|
60191
|
+
limit: false,
|
|
60192
|
+
ignore_config: true,
|
|
60193
|
+
tp: true
|
|
60194
|
+
});
|
|
60195
|
+
}
|
|
60196
|
+
if (focus_position.avg_qty < last_value.avg_size || focusPosition.getInstance().quantity === 0) {
|
|
60191
60197
|
console.log("Placing trade for ", symbol, kind);
|
|
60192
60198
|
await this.placeTrade({
|
|
60193
60199
|
symbol,
|
|
@@ -60197,36 +60203,34 @@ class ExchangeAccount {
|
|
|
60197
60203
|
});
|
|
60198
60204
|
}
|
|
60199
60205
|
console.log("Checking if focus position has quantity for ", symbol, kind);
|
|
60200
|
-
const focusPosition = await this.getFocusPosition({
|
|
60201
|
-
symbol,
|
|
60202
|
-
kind
|
|
60203
|
-
});
|
|
60204
60206
|
const reversePosition = await this.getFocusPosition({
|
|
60205
60207
|
symbol,
|
|
60206
60208
|
kind: kind === "long" ? "short" : "long"
|
|
60207
60209
|
});
|
|
60208
|
-
|
|
60209
|
-
|
|
60210
|
-
|
|
60211
|
-
const reverse_config = await reversePosition.getConfig();
|
|
60212
|
-
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
60213
|
-
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
60214
|
-
await reversePosition.getConfig({
|
|
60215
|
-
params: {
|
|
60216
|
-
entry: opposite_config.entry,
|
|
60217
|
-
stop: opposite_config.stop,
|
|
60218
|
-
risk: opposite_config.risk,
|
|
60219
|
-
risk_reward: opposite_config.risk_reward
|
|
60220
|
-
}
|
|
60221
|
-
});
|
|
60222
|
-
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
60223
|
-
await reversePosition.placeTrade({
|
|
60224
|
-
ignore_config: true,
|
|
60225
|
-
limit: true,
|
|
60226
|
-
place: true
|
|
60210
|
+
if (reversePosition.getInstance().quantity > 0) {
|
|
60211
|
+
const opposite_config = focusPosition.getOppositeConfig({
|
|
60212
|
+
ratio: reward_factor
|
|
60227
60213
|
});
|
|
60214
|
+
const reverse_config = await reversePosition.getConfig();
|
|
60215
|
+
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
60216
|
+
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
60217
|
+
await reversePosition.getConfig({
|
|
60218
|
+
params: {
|
|
60219
|
+
entry: opposite_config.entry,
|
|
60220
|
+
stop: opposite_config.stop,
|
|
60221
|
+
risk: opposite_config.risk,
|
|
60222
|
+
risk_reward: opposite_config.risk_reward
|
|
60223
|
+
}
|
|
60224
|
+
});
|
|
60225
|
+
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
60226
|
+
await reversePosition.placeTrade({
|
|
60227
|
+
ignore_config: true,
|
|
60228
|
+
limit: true,
|
|
60229
|
+
place: true
|
|
60230
|
+
});
|
|
60231
|
+
}
|
|
60232
|
+
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
60228
60233
|
}
|
|
60229
|
-
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
60230
60234
|
return {
|
|
60231
60235
|
config_details: {
|
|
60232
60236
|
app_config,
|
package/dist/index.js
CHANGED
|
@@ -60126,14 +60126,20 @@ class ExchangeAccount {
|
|
|
60126
60126
|
symbol,
|
|
60127
60127
|
kind
|
|
60128
60128
|
});
|
|
60129
|
-
await this.
|
|
60129
|
+
const focusPosition = await this.getFocusPosition({
|
|
60130
60130
|
symbol,
|
|
60131
|
-
kind
|
|
60132
|
-
limit: false,
|
|
60133
|
-
ignore_config: true,
|
|
60134
|
-
tp: true
|
|
60131
|
+
kind
|
|
60135
60132
|
});
|
|
60136
|
-
if (
|
|
60133
|
+
if (focusPosition.getInstance().quantity > 0) {
|
|
60134
|
+
await this.placeTrade({
|
|
60135
|
+
symbol,
|
|
60136
|
+
kind,
|
|
60137
|
+
limit: false,
|
|
60138
|
+
ignore_config: true,
|
|
60139
|
+
tp: true
|
|
60140
|
+
});
|
|
60141
|
+
}
|
|
60142
|
+
if (focus_position.avg_qty < last_value.avg_size || focusPosition.getInstance().quantity === 0) {
|
|
60137
60143
|
console.log("Placing trade for ", symbol, kind);
|
|
60138
60144
|
await this.placeTrade({
|
|
60139
60145
|
symbol,
|
|
@@ -60143,36 +60149,34 @@ class ExchangeAccount {
|
|
|
60143
60149
|
});
|
|
60144
60150
|
}
|
|
60145
60151
|
console.log("Checking if focus position has quantity for ", symbol, kind);
|
|
60146
|
-
const focusPosition = await this.getFocusPosition({
|
|
60147
|
-
symbol,
|
|
60148
|
-
kind
|
|
60149
|
-
});
|
|
60150
60152
|
const reversePosition = await this.getFocusPosition({
|
|
60151
60153
|
symbol,
|
|
60152
60154
|
kind: kind === "long" ? "short" : "long"
|
|
60153
60155
|
});
|
|
60154
|
-
|
|
60155
|
-
|
|
60156
|
-
|
|
60157
|
-
const reverse_config = await reversePosition.getConfig();
|
|
60158
|
-
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
60159
|
-
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
60160
|
-
await reversePosition.getConfig({
|
|
60161
|
-
params: {
|
|
60162
|
-
entry: opposite_config.entry,
|
|
60163
|
-
stop: opposite_config.stop,
|
|
60164
|
-
risk: opposite_config.risk,
|
|
60165
|
-
risk_reward: opposite_config.risk_reward
|
|
60166
|
-
}
|
|
60167
|
-
});
|
|
60168
|
-
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
60169
|
-
await reversePosition.placeTrade({
|
|
60170
|
-
ignore_config: true,
|
|
60171
|
-
limit: true,
|
|
60172
|
-
place: true
|
|
60156
|
+
if (reversePosition.getInstance().quantity > 0) {
|
|
60157
|
+
const opposite_config = focusPosition.getOppositeConfig({
|
|
60158
|
+
ratio: reward_factor
|
|
60173
60159
|
});
|
|
60160
|
+
const reverse_config = await reversePosition.getConfig();
|
|
60161
|
+
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
60162
|
+
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
60163
|
+
await reversePosition.getConfig({
|
|
60164
|
+
params: {
|
|
60165
|
+
entry: opposite_config.entry,
|
|
60166
|
+
stop: opposite_config.stop,
|
|
60167
|
+
risk: opposite_config.risk,
|
|
60168
|
+
risk_reward: opposite_config.risk_reward
|
|
60169
|
+
}
|
|
60170
|
+
});
|
|
60171
|
+
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
60172
|
+
await reversePosition.placeTrade({
|
|
60173
|
+
ignore_config: true,
|
|
60174
|
+
limit: true,
|
|
60175
|
+
place: true
|
|
60176
|
+
});
|
|
60177
|
+
}
|
|
60178
|
+
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
60174
60179
|
}
|
|
60175
|
-
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
60176
60180
|
return {
|
|
60177
60181
|
config_details: {
|
|
60178
60182
|
app_config,
|
package/dist/mcp-server.cjs
CHANGED
|
@@ -66854,14 +66854,20 @@ class ExchangeAccount {
|
|
|
66854
66854
|
symbol,
|
|
66855
66855
|
kind
|
|
66856
66856
|
});
|
|
66857
|
-
await this.
|
|
66857
|
+
const focusPosition = await this.getFocusPosition({
|
|
66858
66858
|
symbol,
|
|
66859
|
-
kind
|
|
66860
|
-
limit: false,
|
|
66861
|
-
ignore_config: true,
|
|
66862
|
-
tp: true
|
|
66859
|
+
kind
|
|
66863
66860
|
});
|
|
66864
|
-
if (
|
|
66861
|
+
if (focusPosition.getInstance().quantity > 0) {
|
|
66862
|
+
await this.placeTrade({
|
|
66863
|
+
symbol,
|
|
66864
|
+
kind,
|
|
66865
|
+
limit: false,
|
|
66866
|
+
ignore_config: true,
|
|
66867
|
+
tp: true
|
|
66868
|
+
});
|
|
66869
|
+
}
|
|
66870
|
+
if (focus_position.avg_qty < last_value.avg_size || focusPosition.getInstance().quantity === 0) {
|
|
66865
66871
|
console.log("Placing trade for ", symbol, kind);
|
|
66866
66872
|
await this.placeTrade({
|
|
66867
66873
|
symbol,
|
|
@@ -66871,36 +66877,34 @@ class ExchangeAccount {
|
|
|
66871
66877
|
});
|
|
66872
66878
|
}
|
|
66873
66879
|
console.log("Checking if focus position has quantity for ", symbol, kind);
|
|
66874
|
-
const focusPosition = await this.getFocusPosition({
|
|
66875
|
-
symbol,
|
|
66876
|
-
kind
|
|
66877
|
-
});
|
|
66878
66880
|
const reversePosition = await this.getFocusPosition({
|
|
66879
66881
|
symbol,
|
|
66880
66882
|
kind: kind === "long" ? "short" : "long"
|
|
66881
66883
|
});
|
|
66882
|
-
|
|
66883
|
-
|
|
66884
|
-
|
|
66885
|
-
const reverse_config = await reversePosition.getConfig();
|
|
66886
|
-
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
66887
|
-
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
66888
|
-
await reversePosition.getConfig({
|
|
66889
|
-
params: {
|
|
66890
|
-
entry: opposite_config.entry,
|
|
66891
|
-
stop: opposite_config.stop,
|
|
66892
|
-
risk: opposite_config.risk,
|
|
66893
|
-
risk_reward: opposite_config.risk_reward
|
|
66894
|
-
}
|
|
66895
|
-
});
|
|
66896
|
-
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
66897
|
-
await reversePosition.placeTrade({
|
|
66898
|
-
ignore_config: true,
|
|
66899
|
-
limit: true,
|
|
66900
|
-
place: true
|
|
66884
|
+
if (reversePosition.getInstance().quantity > 0) {
|
|
66885
|
+
const opposite_config = focusPosition.getOppositeConfig({
|
|
66886
|
+
ratio: reward_factor
|
|
66901
66887
|
});
|
|
66888
|
+
const reverse_config = await reversePosition.getConfig();
|
|
66889
|
+
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
66890
|
+
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
66891
|
+
await reversePosition.getConfig({
|
|
66892
|
+
params: {
|
|
66893
|
+
entry: opposite_config.entry,
|
|
66894
|
+
stop: opposite_config.stop,
|
|
66895
|
+
risk: opposite_config.risk,
|
|
66896
|
+
risk_reward: opposite_config.risk_reward
|
|
66897
|
+
}
|
|
66898
|
+
});
|
|
66899
|
+
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
66900
|
+
await reversePosition.placeTrade({
|
|
66901
|
+
ignore_config: true,
|
|
66902
|
+
limit: true,
|
|
66903
|
+
place: true
|
|
66904
|
+
});
|
|
66905
|
+
}
|
|
66906
|
+
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
66902
66907
|
}
|
|
66903
|
-
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
66904
66908
|
return {
|
|
66905
66909
|
config_details: {
|
|
66906
66910
|
app_config,
|
package/dist/mcp-server.js
CHANGED
|
@@ -66831,14 +66831,20 @@ class ExchangeAccount {
|
|
|
66831
66831
|
symbol,
|
|
66832
66832
|
kind
|
|
66833
66833
|
});
|
|
66834
|
-
await this.
|
|
66834
|
+
const focusPosition = await this.getFocusPosition({
|
|
66835
66835
|
symbol,
|
|
66836
|
-
kind
|
|
66837
|
-
limit: false,
|
|
66838
|
-
ignore_config: true,
|
|
66839
|
-
tp: true
|
|
66836
|
+
kind
|
|
66840
66837
|
});
|
|
66841
|
-
if (
|
|
66838
|
+
if (focusPosition.getInstance().quantity > 0) {
|
|
66839
|
+
await this.placeTrade({
|
|
66840
|
+
symbol,
|
|
66841
|
+
kind,
|
|
66842
|
+
limit: false,
|
|
66843
|
+
ignore_config: true,
|
|
66844
|
+
tp: true
|
|
66845
|
+
});
|
|
66846
|
+
}
|
|
66847
|
+
if (focus_position.avg_qty < last_value.avg_size || focusPosition.getInstance().quantity === 0) {
|
|
66842
66848
|
console.log("Placing trade for ", symbol, kind);
|
|
66843
66849
|
await this.placeTrade({
|
|
66844
66850
|
symbol,
|
|
@@ -66848,36 +66854,34 @@ class ExchangeAccount {
|
|
|
66848
66854
|
});
|
|
66849
66855
|
}
|
|
66850
66856
|
console.log("Checking if focus position has quantity for ", symbol, kind);
|
|
66851
|
-
const focusPosition = await this.getFocusPosition({
|
|
66852
|
-
symbol,
|
|
66853
|
-
kind
|
|
66854
|
-
});
|
|
66855
66857
|
const reversePosition = await this.getFocusPosition({
|
|
66856
66858
|
symbol,
|
|
66857
66859
|
kind: kind === "long" ? "short" : "long"
|
|
66858
66860
|
});
|
|
66859
|
-
|
|
66860
|
-
|
|
66861
|
-
|
|
66862
|
-
const reverse_config = await reversePosition.getConfig();
|
|
66863
|
-
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
66864
|
-
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
66865
|
-
await reversePosition.getConfig({
|
|
66866
|
-
params: {
|
|
66867
|
-
entry: opposite_config.entry,
|
|
66868
|
-
stop: opposite_config.stop,
|
|
66869
|
-
risk: opposite_config.risk,
|
|
66870
|
-
risk_reward: opposite_config.risk_reward
|
|
66871
|
-
}
|
|
66872
|
-
});
|
|
66873
|
-
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
66874
|
-
await reversePosition.placeTrade({
|
|
66875
|
-
ignore_config: true,
|
|
66876
|
-
limit: true,
|
|
66877
|
-
place: true
|
|
66861
|
+
if (reversePosition.getInstance().quantity > 0) {
|
|
66862
|
+
const opposite_config = focusPosition.getOppositeConfig({
|
|
66863
|
+
ratio: reward_factor
|
|
66878
66864
|
});
|
|
66865
|
+
const reverse_config = await reversePosition.getConfig();
|
|
66866
|
+
if ((reverse_config.entry !== opposite_config.entry || reverse_config.stop !== opposite_config.stop || reverse_config.risk !== opposite_config.risk || reverse_config.risk_reward !== opposite_config.risk_reward) && focusPosition.getInstance().quantity > 0) {
|
|
66867
|
+
console.log("Updating reverse config for ", symbol, kind, "with opposite config", opposite_config);
|
|
66868
|
+
await reversePosition.getConfig({
|
|
66869
|
+
params: {
|
|
66870
|
+
entry: opposite_config.entry,
|
|
66871
|
+
stop: opposite_config.stop,
|
|
66872
|
+
risk: opposite_config.risk,
|
|
66873
|
+
risk_reward: opposite_config.risk_reward
|
|
66874
|
+
}
|
|
66875
|
+
});
|
|
66876
|
+
console.log("Placing trade for ", symbol, reversePosition.kind);
|
|
66877
|
+
await reversePosition.placeTrade({
|
|
66878
|
+
ignore_config: true,
|
|
66879
|
+
limit: true,
|
|
66880
|
+
place: true
|
|
66881
|
+
});
|
|
66882
|
+
}
|
|
66883
|
+
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
66879
66884
|
}
|
|
66880
|
-
console.log("Opposite config for ", symbol, kind, opposite_config);
|
|
66881
66885
|
return {
|
|
66882
66886
|
config_details: {
|
|
66883
66887
|
app_config,
|