Skip to content

Commit

Permalink
feat(iqoption): Update websocket URL to use gomerebroker.com
Browse files Browse the repository at this point in the history
  • Loading branch information
andredezzy committed Aug 5, 2024
1 parent 2fe754b commit 9f95391
Show file tree
Hide file tree
Showing 5 changed files with 389 additions and 17 deletions.
8 changes: 4 additions & 4 deletions examples/iqoption/typescript/placeDigitalOption.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../../loadEnv'

import { Hemes } from '@hemes/core'
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption'
import { IQOptionProvider, BaseIQOptionProvider, ActivePair } from '@hemes/iqoption'

async function run() {
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>()
Expand All @@ -12,10 +12,10 @@ async function run() {
})

const position = await account.placeDigitalOption({
active: 'EURUSD',
active: ActivePair.APPLE,
direction: 'call',
expiration_period: 'm1',
price: 1,
expiration_period: 'm5',
price: 1000,
})

console.log('\n', 'Position:', JSON.stringify(position), '\n')
Expand Down
4 changes: 2 additions & 2 deletions packages/iqoption/lib/IQOptionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class IQOptionProvider implements BaseIQOptionProvider {

constructor() {
this.api = axios.create({
baseURL: 'https://trade.avalonbroker.io/api',
baseURL: 'https://trade.gomerebroker.com/api',
})

this.webSocket = new WebSocketClient()
Expand All @@ -46,7 +46,7 @@ export class IQOptionProvider implements BaseIQOptionProvider {
await this.webSocket.subscribe()

const authApi = axios.create({
baseURL: 'https://api.trade.avalonbroker.io/v2/',
baseURL: 'https://api.trade.gomerebroker.com/v2/',
})

if (this.isCorsBypassEnabled) {
Expand Down
Loading

0 comments on commit 9f95391

Please sign in to comment.