move datafeed
This commit is contained in:
parent
e0bfc5e429
commit
7f489f28bb
|
@ -1,21 +1,21 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { makeApiRequest, parseResolution } from './helpers'
|
||||
import { makeApiRequest, parseResolution } from './birdeye/helpers'
|
||||
import {
|
||||
makeApiRequest as makePerpApiRequest,
|
||||
parseResolution as parsePerpResolution,
|
||||
} from '../mngo/helpers'
|
||||
} from './mngo/helpers'
|
||||
import {
|
||||
closeSocket,
|
||||
// isOpen,
|
||||
subscribeOnStream as subscribeOnSpotStream,
|
||||
unsubscribeFromStream,
|
||||
} from './streaming'
|
||||
} from './birdeye/streaming'
|
||||
import {
|
||||
closeSocket as closePerpSocket,
|
||||
// isOpen as isPerpOpen,
|
||||
subscribeOnStream as subscribeOnPerpStream,
|
||||
unsubscribeFromStream as unsubscribeFromPerpStream,
|
||||
} from '../mngo/streaming'
|
||||
} from './mngo/streaming'
|
||||
import mangoStore from '@store/mangoStore'
|
||||
import {
|
||||
DatafeedConfiguration,
|
||||
|
@ -207,6 +207,7 @@ export default {
|
|||
}
|
||||
}
|
||||
const ticker = mangoStore.getState().selectedMarket.name
|
||||
console.log('ticker', ticker, mangoStore.getState().group)
|
||||
|
||||
const symbolInfo: SymbolInfo = {
|
||||
address: symbolItem.address,
|
|
@ -33,7 +33,7 @@ import { PublicKey } from '@solana/web3.js'
|
|||
import useLocalStorageState from 'hooks/useLocalStorageState'
|
||||
import { formatNumericValue, getDecimalCount } from 'utils/numbers'
|
||||
import { BN } from '@project-serum/anchor'
|
||||
import SpotDatafeed from 'apis/birdeye/datafeed'
|
||||
import Datafeed from 'apis/datafeed'
|
||||
// import PerpDatafeed from 'apis/mngo/datafeed'
|
||||
import useStablePrice from 'hooks/useStablePrice'
|
||||
import { isMangoError } from 'types'
|
||||
|
@ -695,7 +695,7 @@ const TradingViewChart = () => {
|
|||
const widgetOptions: ChartingLibraryWidgetOptions = {
|
||||
// debug: true,
|
||||
symbol: marketAddress,
|
||||
datafeed: SpotDatafeed,
|
||||
datafeed: Datafeed,
|
||||
interval:
|
||||
defaultProps.interval as ChartingLibraryWidgetOptions['interval'],
|
||||
container:
|
||||
|
|
|
@ -20,7 +20,7 @@ import Loading from '@components/shared/Loading'
|
|||
import clsx from 'clsx'
|
||||
import { IconButton } from '@components/shared/Button'
|
||||
import { ArrowsPointingOutIcon, XMarkIcon } from '@heroicons/react/20/solid'
|
||||
import spotDataFeed, { SymbolInfo } from 'apis/birdeye/datafeed'
|
||||
import spotDataFeed, { SymbolInfo } from 'apis/datafeed'
|
||||
import perpDataFeed from 'apis/mngo/datafeed'
|
||||
import { sleep } from 'utils'
|
||||
import { useKlineChart } from 'hooks/useKlineChart'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SUPPORTED_RESOLUTIONS as SUPPORTED_SPOT_RESOLUTIONS } from 'apis/birdeye/datafeed'
|
||||
import { SUPPORTED_RESOLUTIONS as SUPPORTED_SPOT_RESOLUTIONS } from 'apis/datafeed'
|
||||
|
||||
export const ONE_HOUR_MINS = 60
|
||||
export const ONE_MINUTE_SECONDS = 60
|
||||
|
|
Loading…
Reference in New Issue