Skip to content

Commit

Permalink
Removed Effective Spread Endpoint (#27)
Browse files Browse the repository at this point in the history
Removed StockService.EffectiveSpreadAsync() as it seems to have been removed. https://iexcloud.io/docs/api/#effective-spread

LargestTradesAsyncTest now using stocks from the NYSE.

See: https://iexcloud.io/docs/api/#largest-trades

For Nasdaq-listed stocks, this endpoint returns an empty array unless the account has been authorized by UTP to receive delayed market data on Nasdaq-listed stocks.
  • Loading branch information
JamiePrentice authored May 5, 2020
1 parent 0ca64c9 commit 0671b84
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
7 changes: 0 additions & 7 deletions IEXSharp/Service/Cloud/Stock/IStockService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ public interface IStockService
/// <returns></returns>
Task<IEXResponse<Dictionary<string, BatchResponse>>> BatchByMarketAsync(IEnumerable<string> symbols, IEnumerable<BatchType> types, string range = "", int last = 1);

/// <summary>
/// <see cref="https://iexcloud.io/docs/api/#effective-spread"/>
/// </summary>
/// <param name="symbol"></param>
/// <returns></returns>
Task<IEXResponse<IEnumerable<EffectiveSpreadResponse>>> EffectiveSpreadAsync(string symbol);

/// <summary>
/// <see cref="https://iexcloud.io/docs/api/#news"/>
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions IEXSharp/Service/Cloud/Stock/StockService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ public async Task<IEXResponse<Dictionary<string, BatchResponse>>> BatchByMarketA
return await executor.ExecuteAsync<Dictionary<string, BatchResponse>>(urlPattern, pathNvc, qsb);
}

public async Task<IEXResponse<IEnumerable<EffectiveSpreadResponse>>> EffectiveSpreadAsync(string symbol) =>
await executor.SymbolExecuteAsync<IEnumerable<EffectiveSpreadResponse>>(
"stock/[symbol]/effective-spread", symbol);

public async Task<IEXResponse<IEnumerable<NewsResponse>>> NewsAsync(string symbol, int last = 10) =>
await executor.SymbolLastExecuteAsync<IEnumerable<NewsResponse>>("stock/[symbol]/news/last/[last]", symbol, last);

Expand Down
4 changes: 2 additions & 2 deletions IEXSharpTest/Cloud/StockPricesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ public async Task IntradayPriceAsyncTest(string symbol)
}

[Test]
[TestCase("AAPL")]
[TestCase("FB")]
[TestCase("F")]
[TestCase("GE")]
public async Task LargestTradesAsyncTest(string symbol)
{
var response = await sandBoxClient.StockPrices.LargestTradesAsync(symbol);
Expand Down
13 changes: 1 addition & 12 deletions IEXSharpTest/Cloud/StockTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,7 @@ public async Task BatchByMarketAsyncTest(IEnumerable<string> symbols, IEnumerabl
Assert.IsNotNull(response);
Assert.IsNotNull(response.Data[symbols.ToList()[0]]);
}

[Test]
[TestCase("AAPL")]
[TestCase("FB")]
public async Task EffectiveSpreadAsyncTest(string symbol)
{
var response = await sandBoxClient.Stock.EffectiveSpreadAsync(symbol);

Assert.IsNull(response.ErrorMessage);
Assert.IsNotNull(response.Data);
}


[Test]
[TestCase("AAPL", 10)]
[TestCase("FB", 20)]
Expand Down

0 comments on commit 0671b84

Please sign in to comment.