@@ -8,9 +8,7 @@ export interface KalshiGetBalanceResponse {
88 success : boolean
99 output : {
1010 balance : number // In cents
11- portfolioValue ?: number // In cents
12- balanceDollars : number // Converted to dollars
13- portfolioValueDollars ?: number // Converted to dollars
11+ portfolioValue : number // In cents
1412 }
1513}
1614
@@ -51,24 +49,20 @@ export const kalshiGetBalanceTool: ToolConfig<KalshiGetBalanceParams, KalshiGetB
5149 handleKalshiError ( data , response . status , 'get_balance' )
5250 }
5351
54- const balance = data . balance || 0
55- const portfolioValue = data . portfolio_value
52+ const balance = data . balance ?? 0
53+ const portfolioValue = data . portfolio_value ?? 0
5654
5755 return {
5856 success : true ,
5957 output : {
6058 balance,
6159 portfolioValue,
62- balanceDollars : balance / 100 ,
63- portfolioValueDollars : portfolioValue ? portfolioValue / 100 : undefined ,
6460 } ,
6561 }
6662 } ,
6763
6864 outputs : {
6965 balance : { type : 'number' , description : 'Account balance in cents' } ,
7066 portfolioValue : { type : 'number' , description : 'Portfolio value in cents' } ,
71- balanceDollars : { type : 'number' , description : 'Account balance in dollars' } ,
72- portfolioValueDollars : { type : 'number' , description : 'Portfolio value in dollars' } ,
7367 } ,
7468}
0 commit comments